Commit Graph

28 Commits

Author SHA1 Message Date
evazion
5c6d26ea24 pundit: convert users to pundit. 2020-03-20 18:03:00 -05:00
evazion
29ed12b238 admins: remove ability to manually process BURs.
Remove the ability for admins to manually submit BURs without going
through the forum.
2020-02-28 14:23:31 -06:00
evazion
d73895312e Avoid swallowing exceptions unnecessarily. 2019-08-29 00:51:52 -05:00
evazion
6ff70c5002 mod actions: separate account upgrades from promotions (fix #3841) 2018-08-26 11:12:04 -05:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
evazion
40092f21ba Remove redundant rescue_from calls.
These are redundant because ApplicationController rescues these exceptions already.
2017-02-25 02:18:16 -06:00
r888888888
aa41c41572 fixes #2876: Changing approver/contributor privileges should log mod action 2017-02-14 12:46:54 -08:00
evazion
d74503ae05 tests: add misc controller tests. 2017-02-06 18:48:35 -06:00
r888888888
5a853bcedb tweaks to new can_upload_free flag #2469 2015-10-15 16:23:30 -07:00
r888888888
7195c0b5fd admin dashboard 2014-11-06 18:05:33 -08:00
r888888888
56ae78f963 refactored user promotion code, related to #1257 2014-03-05 17:44:07 -08:00
r888888888
14dd0430cb fixes #1257 2014-03-05 17:33:57 -08:00
r888888888
cc9b5a0c61 Create new transaction log table to track user conversions 2014-02-10 13:35:39 -08:00
Toks
0f5fe4e7b6 fixes #1234 2013-05-02 22:25:44 -04:00
Toks
3994932a20 fixes #1256 2013-04-22 21:10:05 -04:00
r888888888
db24ed3508 add tests for user promotion/demotion admin interface 2013-04-16 21:03:32 -07:00
r888888888
6c5887c94a fixes #1285 2013-04-16 20:49:51 -07:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
bbee928f7e fixes #912 2013-03-17 21:24:37 -04:00
albert
30fb0b660c added promote link to user page 2011-12-20 11:57:33 -05:00
albert
bae1f39dcf added alias and implication importer 2011-12-20 11:46:07 -05:00
albert
c03ed4f644 fixes #119: bad text on post flags 2011-10-14 17:12:03 -04:00
albert
eb10aacdce fix for admin edit users 2011-10-14 15:54:30 -04:00
albert
010f210345 add admin user interface 2011-09-13 19:37:24 -04:00
albert
80683f3f17 updated rails version 2011-08-06 15:50:37 -04:00
albert
f051e04550 sync 2010-10-08 18:42:26 -04:00
albert
15c134b270 work on controllers/views started 2010-03-11 19:42:04 -05:00
albert
ac98d7db37 stubbed in blank controllers/helpers/functional tests 2010-03-10 18:21:43 -05:00