Commit Graph

42 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
r888888888
e0ec9ed518 fix ordering of forum posts in topics 2018-02-01 16:35:47 -08:00
BrokenEagle
d829ab3a00 Move all order logic to models
- Have a default order for each model
-- The overall default is ID DESC
- Allow for custom orderings
-- When comma-separated IDs are used
2018-01-29 11:42:53 -08:00
BrokenEagle
956bd707a5 Add additional restrictions on updating deleted pools 2017-11-20 19:31:11 -08:00
r888888888
c83a76ccce fixes #3282 2017-09-14 11:07:14 -07:00
evazion
3b9a54f681 pools: strip leading/trailing, consecutive underscores in names (fix #3263). 2017-08-10 18:33:36 -05:00
evazion
0c79d2f09e Removed unused controllers actions / routes (#3206). 2017-07-07 15:38:06 -05:00
evazion
c46b31aa9c Prevent reverting to foreign versions (fixes #2711). 2016-10-11 06:57:46 +00:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
Toks
5a8674d342 fix #2239 2015-05-02 11:12:30 -04:00
Toks
cbdc78d606 #2245 make gallery obey user's per page setting 2014-09-07 00:03:23 -04:00
Toks
4f0a83f996 #2245 allow anonymous to view gallery 2014-09-06 23:58:00 -04:00
r888888888
267df896c6 fixes #2245 2014-08-25 16:41:27 -07:00
Toks
2bc5605edc Allow searching for deleted pools 2013-11-01 10:07:47 -04:00
r888888888
e5171d0610 fixes #1999 2013-09-26 17:27:47 -07:00
r888888888
bd4b018e83 fixes #1916 2013-09-04 17:34:33 -07:00
Toks
b32783c8ba fixes #1946 2013-08-18 18:24:39 -04:00
Toks
ab57c4fa09 fixes #1713 2013-07-11 21:14:18 -04:00
Toks
2016e15ce8 fixes #1508 2013-06-30 11:57:30 -04:00
Toks
d99e9c5d81 fixes #1561 2013-05-20 08:42:15 -04:00
Toks
9ccf1e0f8f add limit parameter to everything 2013-05-15 01:01:19 -04:00
Toks
240eba56c2 fixes #1429 2013-04-30 19:54:00 -04:00
albert
541dabaaf6 fixes #1108 2013-03-29 15:37:28 -04:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
56dd8707fd controller tweaks 2013-02-23 15:58:21 -05:00
albert
78f1d0f69a fixes to user search 2013-02-21 12:42:41 -05:00
albert
e7aff87c65 fix for pool selection 2013-02-19 13:30:55 -05:00
albert
eb5e526678 enable uploads 2013-02-17 21:39:15 -05:00
albert
44682156c0 fix searches 2013-02-17 21:09:25 -05:00
albert
6ba9b015e4 fixes 2013-02-17 01:38:34 -05:00
albert
779d83e253 fixed pool deletion logic 2012-03-15 18:26:39 -04:00
albert
dd5a965884 fixes 2012-03-12 17:50:45 -04:00
albert
91f71201fa fixes #131: Unable to delete pools 2011-10-15 22:36:43 -04:00
albert
5ee7bcd51b fixes #79: When you remove a post from a pool, the post still shows the pool in its left sidebar 2011-09-15 19:15:10 -04:00
albert
f63de376b7 Fixes #28: Pool reording does not work 2011-09-13 13:28:33 -04:00
albert
5cf122c2e0 changes 2011-06-29 12:47:40 -04:00
albert
d6e4283cc7 refactoring 2011-06-12 16:41:23 -04:00
albert
158810d9f0 fixed comment test 2011-05-16 09:27:06 -04:00
albert
a281bf03ed improved pool interface 2011-03-04 18:50:38 -05:00
albert
6d0157265c pool views 2011-02-25 17:41:00 -05:00
albert
cd451109e8 stubbed in pool controller test 2011-01-20 18:30:36 -05:00
albert
ac98d7db37 stubbed in blank controllers/helpers/functional tests 2010-03-10 18:21:43 -05:00