Commit Graph

85 Commits

Author SHA1 Message Date
Albert Yi
f2b525a6d2 Implement forum topic voting and tag change pruning (#3580) 2018-04-26 15:31:06 -07:00
Albert Yi
cd88a8df9f fixes #3620 2018-04-12 13:00:48 -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
r888888888
974a770bc6 fixes #3354 2017-11-13 16:41:01 -08:00
evazion
1c06ae9f81 atom feeds: fix deprecation warnings in *_path helpers.
DEPRECATION WARNING: You are calling a `*_path` helper with the
`only_path` option explicitly set to `false`. This option will stop
working on path helpers in Rails 5. Use the corresponding `*_url` helper
instead.
2017-07-01 11:45:28 -05:00
r888888888
1478eff561 fixes #3098 2017-05-30 12:36:07 -07:00
evazion
1b03832b26 /forum_topics/$id: fix atom feed discovery link.
> Found an issue with the forum topic ATOM discovery link. Currently the
> link is visible to feed detectors, but they are unable to add it since
> the link provided is invalid.
>
> <link rel="alternate" type="application/atom+xml" title="Artist tagging
> help" href="http://danbooru.donmai.us/forum_topics.8199" />
2017-05-24 16:11:00 -05:00
evazion
8c88e87710 /forum_topics.atom: add atom feed for forum topics. 2017-05-13 10:37:59 -05:00
r888888888
98b305b4db add link to mod+ topics 2017-01-24 13:13:13 -08:00
evazion
7571cda640 hotkeys: add E to edit, shift+D to delete to artists, pools, wiki, forum. 2017-01-24 02:46:00 -06:00
evazion
469f48a118 Fix @mention autocomplete for comments & forum posts.
Fix comment autocomplete (broken in 1257639). Also fix forum post
autocomplete (didn't work when editing forum posts).
2017-01-02 12:53:30 -06:00
evazion
1cce721114 Fix #2772: Topics set as mod+ can't be reverted to public ones. 2016-11-28 05:50:46 -06:00
evazion
daf1324ab2 Refactor available_min_user_levels to view helper. 2016-11-28 01:36:59 -06:00
Albert Yi
eb6746a8a8 additional checks on forum topic visibility 2016-11-07 10:48:04 -08:00
Albert Yi
79842f7a3b restrict min level constraints for forum topics to mod+admin and restrict options based on current user's level. check privileges for visiblity in forum posts and topics. deprecate serializable_hash (undocumented, internal) for as_json, refactor to use hidden_attributes and method_attributes #2658 2016-10-25 15:05:55 -07:00
Albert Yi
589df5f301 implements #2658: private forum topics 2016-10-24 16:56:18 -07:00
r888888888
61dd08cd2b fixes #2657: Move 'Request Alias/Implication' link to forum subnav. 2016-09-07 16:30:32 -07:00
Type-kun
a7d553038f Add "disable-with" to most edit forms (should fix #2264) 2016-08-30 22:54:38 +05:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
Toks
7ba2a93863 fix #2403 2015-06-14 10:25:20 -04:00
Toks
883a4cbf5a Clarify 2015-06-09 13:21:02 -04:00
Toks
7c2ce325a3 fix #2403, remove unused code 2015-06-08 17:34:13 -04:00
r888888888
182b794c8e fixes #2345 2015-02-15 13:01:45 -08:00
r888888888
7195c0b5fd admin dashboard 2014-11-06 18:05:33 -08:00
r888888888
bb402f5a27 fixes #2197 2014-07-17 16:34:54 -07:00
r888888888
fad0ab7c93 fixes #2133 2014-04-16 17:43:34 -07:00
r888888888
de34d21f76 fixes #1289 2014-03-18 11:21:10 -07:00
r888888888
7e07b874a4 implementation for #1469
This reverts commit 18edc937fd.
2014-03-14 18:39:31 -07:00
r888888888
18edc937fd Revert "implementation for #1469"
This reverts commit 08b9b2771f.
2014-03-10 16:31:38 -07:00
r888888888
08b9b2771f implementation for #1469 2014-03-07 15:55:49 -08:00
Toks
a26c0e26fd fixes #2008 2013-10-18 13:50:29 -04:00
Toks
59aa45e83b fixes #920 2013-10-09 13:05:06 -04:00
r888888888
468d68d834 fixes #1856 2013-07-23 15:29:39 -07:00
r888888888
ee34db677f fixes #1855 2013-07-23 15:24:45 -07:00
Toks
39a6cca62a fixes #1080 2013-07-07 19:29:24 -04:00
Toks
0dff962d9e fixes #1206 2013-06-30 10:51:12 -04:00
Toks
e962f755d6 fixes #1742 2013-06-18 17:00:50 -04:00
r888888888
a40331cfe8 fixed forum topics test 2013-06-17 16:00:53 -07:00
Toks
73b5f5c9e2 Merge branch 'inline-editable-posts' 2013-06-14 12:44:18 -04:00
Toks
029c050243 fixes #1424 for forum posts and topics 2013-06-14 12:23:29 -04:00
r888888888
f16178623b add categories to forum topics 2013-06-06 16:18:04 -07:00
r888888888
d5f575159f rename references of privileged to gold 2013-04-28 00:04:52 -07:00
Toks
9982c94f68 fixes #1278; fixes #1279 2013-04-11 14:27:39 -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
b8de1a85d5 fixes #1038 2013-03-22 19:33:46 -04:00
albert
40ee7e72b8 fixes #965 2013-03-22 10:31:27 -07:00
albert
8bfd7b408f remove links that are not usable by anon users, fixes #977 2013-03-22 10:18:05 -07:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
f5240d06fe fixes #945 2013-03-18 17:12:44 -07:00