Commit Graph

115 Commits

Author SHA1 Message Date
evazion
19b92acabc Fix #3970: Make "Copy all notes" not builder exclusive. 2018-11-04 16:42:55 -06:00
evazion
39374a70d3 posts/show: rename tags params to q in various places.
Fixup for 011a6f1f7.
2018-10-30 11:32:07 -05:00
evazion
d536f75505 related tags: eliminate recent_tags cookie (#3955). 2018-10-12 21:20:06 -05:00
evazion
f886f2fdb3 posts/show: load flag/appeal/replacement dialogs via ajax (#3922). 2018-09-26 20:01:14 -05:00
evazion
6fe883c316 posts index: clean up limit:<n> / order:random parsing (#2894)
* Move the limit:<n> / order:random metatag parsing from the controller
  to the post set.

* Introduce `Tag.has_metatag?` and use it to parse these metatags
  instead of using a regex (#2894).
2018-09-20 19:23:47 -05:00
evazion
e772de40a7 posts: add /posts/{id}.html?variant=tooltip template. 2018-04-25 22:12:26 -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
7a0fb0f5d3 Fix #3500: Redirect API endpoints with md5 query param to correct format. 2018-01-14 20:36:57 -06:00
evazion
07a4bdcb21 posts: display validation warnings in flash notice. 2017-11-25 17:03:32 -06:00
r888888888
d0ccce6985 fixes #3350 2017-11-07 11:56:26 -08:00
evazion
45676491ff Post.fast_count: remove uses of unused statement_timeout param (#3206).
Not used since 81684e6.
2017-07-14 17:35:42 -05: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
evazion
23038de470 posts_controller.rb: remove unused /posts/home action.
Unused since a4911e3.
2017-02-06 19:07:03 -06:00
r888888888
bfa56a860c fixes #2415: "Random post" causes RecordNotFound exceptions 2017-01-18 14:12:12 -08:00
Albert Yi
bdac591266 fixes #2838 2017-01-16 12:57:43 -08:00
evazion
ef3f390bba Fix #2813: /posts/random.json does not redirect nicely. 2017-01-01 04:04:46 -06:00
evazion
c46b31aa9c Prevent reverting to foreign versions (fixes #2711). 2016-10-11 06:57:46 +00:00
r888888888
2c80d7b82e more intelligent notice for mod queue 2016-09-09 15:08:23 -07:00
r888888888
3542ffe1f7 refactor inactive janitor notice 2016-09-09 14:30:35 -07:00
r888888888
1682196490 fix role 2016-09-08 16:02:51 -07:00
r888888888
de34c7fca3 fixes #2650: Add random mode to mod queue 2016-09-08 15:55:06 -07:00
r888888888
9d3d7abedc add support for read only post queries 2016-01-25 16:40:23 -08:00
Toks
7c7f92d1b2 Fix errors saving recent tags not displaying correctly 2015-11-08 15:07:01 -05:00
r888888888
d8f639e721 fixes #2444 2015-07-21 13:42:32 -07:00
r888888888
6ad6aa44c4 fixes #2432, fix tests 2015-07-14 15:13:04 -07:00
Toks
f3e4aa51f0 preserve favgroup_id 2015-06-25 10:45:26 -04:00
Toks
eb560be34b #2415 remove ordering from random post link 2015-06-22 14:23:59 -04:00
Toks
3bc92f1ca7 #1938 Add order:random as alternative random trigger 2015-06-09 18:15:50 -04:00
Toks
6a78d75f61 Fix "mark as translated" removing url params 2015-05-23 12:26:31 -04:00
Toks
0d24a45855 fixes #1938, Add special random parameter 2015-05-17 20:06:31 -04:00
Toks
8c63bf5b72 fixes #1495 2015-05-13 18:25:01 -04:00
Toks
f060e78b8f fix #2196 2014-06-16 20:07:52 -04:00
Toks
3f61415388 Merge branch 'active-children' 2014-05-29 23:03:05 -04:00
Toks
71cd5ce783 fixes #2114 2014-05-29 22:55:35 -04:00
Toks
5f12a5e555 fixes #2165 2014-05-25 14:50:07 -04:00
r888888888
6630bd9a41 fixes #2161 2014-05-22 17:52:05 -07:00
Toks
cac73439bd Fix error 2013-12-24 20:24:19 -05:00
Toks
8c95f13b11 Fix post relationship previews not always displaying deleted parents 2013-12-23 12:30:06 -05:00
r888888888
1da18ae57b fixes #2020 2013-12-03 17:26:04 -08:00
Toks
344180a7bd fixes #1836 2013-11-29 18:04:37 -05:00
r888888888
8296b9a26f remove debug logging 2013-10-08 15:24:27 -07:00
r888888888
892d62fac3 fixes #1982 2013-10-07 17:59:43 -07:00
Toks
ab7d3f69a4 #1938: Add random post link 2013-09-17 15:51:41 -04:00
Toks
b2431f9987 Revert "fixes #1960"
This reverts commit 3b45c4d866.
2013-09-13 12:38:50 -04:00
Toks
3b45c4d866 fixes #1960 2013-08-25 22:38:11 -04:00
Toks
70be0368e4 Improve note copying validations and errors
fixes #1956; fixes #1957
2013-08-24 14:23:24 -04:00
Toks
ab4196a0e3 Rename duplicate dom id; fixes #1823
closes #1935
2013-08-14 13:13:14 -04:00
Toks
1b077dbc02 Merge branch 'master' of https://github.com/r888888888/danbooru 2013-07-05 10:33:59 -04:00
Toks
afdc61c31a fixes #1829 2013-07-05 10:33:54 -04:00
r888888888
279c5e7b6a fixes #1825 2013-07-04 20:48:06 -07:00