Commit Graph

71 Commits

Author SHA1 Message Date
Albert Yi
d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00
Albert Yi
a25629bff9 fixes #3594 2018-04-11 11:14:58 -07: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
084fcd91ed Only generate tagged filenames for URLs on post show pages (#3597).
Don't generate tagged filenames for urls in the data attributes on
thumbnails, or in the /posts.json api.
2018-04-05 14:20:37 -05:00
evazion
41a4ff15cd posts: remove unused file path / url methods.
* Remove file_path_for, cropped_file_url (dead code)
* Remove complete_preview_file_url (preview_file_url now returns absolute links)
* Remove `file_name` (only used for Download link in sidebar)
2018-03-20 19:49:55 -05:00
Type-kun
af7c109912 Restrict post replacements to mod+ (issue #3348) 2017-11-01 13:19:52 +05:00
r888888888
13f7d7e66d add targeted post down voting report, add delayed job plugin to disable statement timeout 2017-10-10 12:56:57 -07:00
r888888888
9ffbae3cc0 expose resize image to window functionality to anon users 2017-09-29 18:11:22 -07:00
r888888888
ffb212c616 remove extraneous links from post/show 2017-09-18 15:00:39 -07:00
r888888888
792d95227b remove mobile version links 2017-09-07 18:37:51 -07:00
evazion
648cc9ecb7 Move post replacement create action to post replacements controller. 2017-05-14 21:31:01 -05:00
evazion
4e841c4ea5 post replacement: add "Replace Image" dialog to post sidebar. 2017-05-02 20:41:19 -05:00
evazion
5f6506cbb4 /posts/1234: add confirm dialog to sidebar approve/undelete links. 2017-04-06 22:33:34 -05:00
Toks
1c81c303d6 Add sidebar link for adding to favgroup 2015-07-27 21:01:34 -04:00
Toks
7c90fca006 Allow moving favorites for already deleted post 2015-07-07 11:08:32 -04:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
Toks
0120fe8acb Add "Download" link which will include post's tags in filename 2015-06-10 23:38:25 -04:00
Toks
abfd48d58a #1938: Add random post keyboard shortcut 2014-06-08 14:34:36 -04:00
r888888888
9e2c664a41 fixes #2130 2014-05-05 17:59:54 -07:00
r888888888
fad0ab7c93 fixes #2133 2014-04-16 17:43:34 -07:00
r888888888
6a3696f06b add html ids to post/show options for css customization 2013-12-03 15:57:08 -08:00
Toks
306c4e6900 Fix error with mobile link 2013-11-26 13:06:13 -05:00
r888888888
1304912ee1 link to mobile versions 2013-11-21 14:38:42 -08:00
Toks
fd4c8c3cd3 Add artist commentary, fixes #2024 2013-11-19 10:37:02 -05:00
Toks
ab7d3f69a4 #1938: Add random post link 2013-09-17 15:51:41 -04:00
Toks
6a2e209fe0 Hide copy all notes link for posts without notes
#1956
2013-08-24 13:38:05 -04:00
Toks
3d25776017 fixes #1496 2013-05-25 15:22:06 -04:00
Toks
17af05b2b1 fixes #720 2013-05-18 16:25:46 -04:00
r888888888
d5f575159f rename references of privileged to gold 2013-04-28 00:04:52 -07:00
Toks
3682067206 fix edit link location with respect to unfavorite link 2013-04-24 07:46:15 -04:00
Toks
c6b1e5885c fixes #1407 2013-04-22 19:16:54 -04:00
r888888888
2dfa616f33 fixes #1350, better db:seed script 2013-04-16 20:23:02 -07:00
r888888888
d5eaf9aa0d add support for banning/unbanning posts 2013-04-14 18:50:45 -07:00
Toks
4e44d93a39 fixes #1274 2013-04-11 12:28:13 -04:00
albert
c540c4f891 Fixes #1121, rename Post#annihilate to Post#expunge 2013-04-08 13:44:43 -04:00
Toks
8a50e0ccff fixes #1155 2013-04-05 19:06:17 -04:00
albert
4c93154569 fixes #1031 2013-03-22 08:45:01 -07:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
3621edd357 fixes #715 2013-03-05 17:53:59 -05:00
albert
64efef4ecf rearrange layout, fix tag blacklist js 2013-02-23 20:45:33 -05:00
albert
4a61498f0e delete action from post/show requires confirmation+flag reason now 2013-02-23 16:53:03 -05:00
albert
d18b44fb1b janitors can undelete/delete 2013-02-22 16:35:25 -05:00
albert
1620d37ebb add post image resize to window option 2013-02-18 14:24:40 -05:00
albert
ed23f08939 text adjustments 2012-11-19 14:44:35 -05:00
albert
4436a8c343 text adjustments 2012-11-19 14:37:33 -05:00
albert
ec97b6aaf9 style tweaks 2012-04-20 18:01:09 -04:00
albert
3cbcd1e6b9 tweaks 2012-04-18 12:20:49 -04:00
albert
1ef7ef49a5 added share links, moved image resize back to notice banner style 2012-03-30 14:28:46 -04:00
albert
0a88c1fb8a conditionally hide links from post/show sidebar 2012-03-30 13:41:30 -04:00
albert
bb31555035 fixes #283 2012-01-15 13:35:49 -05:00