Commit Graph

31 Commits

Author SHA1 Message Date
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
BrokenEagle
613beee375 Differentiate version views with reversion links 2018-01-01 19:36:27 -08:00
evazion
e875f2973a /notes, /note_versions: link directly to note within post.
Also adds a "»" link, linking to the note's history.
2017-07-07 16:39:10 -05:00
evazion
989917cb07 /notes, /note_versions: use numbered paginator. 2017-04-23 14:59:36 -05:00
evazion
bdf3366bcf Link IP addresses to IP searches. 2017-01-12 09:15:14 +00:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
Toks
ad8e16aabf fix #2012 2015-04-15 11:29:15 -04:00
r888888888
fad0ab7c93 fixes #2133 2014-04-16 17:43:34 -07:00
Toks
ab0b935715 Clean up note views
* Make note deleted notice stand out more
* Use same note deleted notice on both note views
* Don't render notes as dtext
2013-07-18 12:51:10 -04:00
Toks
77dfd91702 fixes #1658; fixes #1592 2013-05-25 19:49:19 -04:00
Toks
3648db0928 fixes #1139, fix other history page inconsistencies 2013-04-05 16:24:27 -04:00
Toks
8b33cac661 replace old user links with new format 2013-04-04 23:16:28 -04:00
Toks
4f42ab8bdb adds support for user level-dependent classes
all links to users should have their class attribute set to that user's
level_class
2013-03-30 12:04:58 -04:00
albert
4dcc21a97a fixes #948 2013-03-22 10:47:24 -07:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
65d366e71f fixes #756 - hide table header 2013-03-05 20:38:30 -05:00
albert
7585462368 add test case for note 2013-02-23 10:44:42 -05:00
albert
bbb8767b29 make forum post quoting regexp nongreedy 2013-02-22 12:24:10 -05:00
albert
8749c43b3e refactored search 2013-01-10 17:45:52 -05:00
albert
f6367aab49 layout fixes 2011-11-03 17:14:41 -04:00
albert
34ae712be0 fixed titles 2011-10-23 16:55:57 -04:00
albert
1b7102b2e6 style improvements 2011-10-15 13:10:24 -04:00
albert
63d3cb337a Fixes #82: Notes do not hide when clicking image 2011-09-18 17:59:20 -04:00
albert
3183872b1e Fixes #39: Reverting a translation does not work 2011-09-11 14:47:35 -04:00
albert
24bf21540a refactoring views 2011-08-16 18:47:01 -04:00
albert
c8afd34d15 added ip addr search 2011-07-29 18:04:50 -04:00
albert
a16dfdf0dd fixes 2011-07-09 03:32:18 -04:00
albert
2f1fdcb459 more work on paginators 2011-06-21 14:32:07 -04:00
albert
cbd877d020 fixed comment vote functional test 2011-04-01 19:01:17 -04:00
albert
9e7efbd295 stubbed in view code from old danbooru; only janitors can lock a wiki page 2011-02-28 14:18:39 -05:00
albert
683d4583ac * Added note version controller and test
* Added pool version controller and test
* Refactored unit tests for post disapprovals
* Renamed PostModerationDetail to PostDisapproval
2011-01-25 18:13:05 -05:00