Commit Graph

59 Commits

Author SHA1 Message Date
evazion
a6499b5169 post tooltips: add disable option (#3689).
* Add "disable post tooltips" account setting.
* Add back title attribute for when fancy tooltips are disabled.
2018-04-28 23:50:51 -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
2deefcc090 Fix exception when viewing /favorite_groups while logged out.
Also fixes a test failure in the favgroups controller tests.
2018-01-20 13:47:41 -06:00
evazion
806513836b Fix failbooru in /users/custom_style.css when custom_style is nil.
http://danbooru.donmai.us/users/custom_style.css failed when manually
requested by anonymous users, or by users who didn't have a style set.
2017-12-23 11:11:50 -06:00
r888888888
a95af95eae move desktop mode to user pref 2017-12-15 13:52:25 -08:00
evazion
df7648b581 Fix #3392: Add safe mode account setting. 2017-11-20 18:59:53 -06:00
r888888888
e70c2a3085 remove references to tag subscriptions 2017-11-17 13:45:17 -08:00
BrokenEagle
5b4ab8d80e Disallow a user from seeing flagger's name on own uploads 2017-11-08 00:37:16 -08:00
r888888888
32ff7de6d8 fixes #3346 2017-10-30 14:47:00 -07:00
r888888888
9ffbae3cc0 expose resize image to window functionality to anon users 2017-09-29 18:11:22 -07:00
r888888888
68863ed018 fixes #3287 2017-09-08 15:01:12 -07:00
r888888888
63f7edd0c6 add toggle for testing cropped thumbnails 2017-09-06 17:02:43 -07:00
Type-kun
1375cc5307 Added privilege check for seeing flagger usernames
Also reworked all places dealing with flagger names to use said privilege
2017-06-14 20:43:25 +05:00
evazion
f1f6e5ccc9 anonymous_user.rb: generate is_<role>? methods from User::Roles. 2017-05-21 12:27:39 -05:00
r888888888
68a91feadc add ban_expired? method to anonymous user 2017-05-15 16:34:18 -07:00
r888888888
48e9856f37 fixes #3007: Eliminate Janitor role 2017-05-01 14:38:30 -07:00
Albert Yi
f2a5d45db0 implement token bucket rate limiting 2017-01-09 17:31:14 -08:00
Albert Yi
b17cd5bffc fix for sessionless api limits 2016-10-18 13:04:50 -07:00
r888888888
bdd408952b add user option for disabling tagged filenames 2016-05-26 10:16:13 -07:00
r888888888
6d6d00b190 expose voting to non-gold supervoters 2016-03-14 16:52:49 -07:00
Toks
2d3b7182bc #2523 Enable categorized saved searches by default 2015-11-13 00:14:08 -05:00
r888888888
6514265ca7 support new listbooru changes #2523 2015-11-03 16:50:52 -08:00
Toks
b708f5ea03 Don't allow banned ip addresses to make changes
Previously banned ip addresses couldn't make new accounts, but if they
get an account somehow the ip ban wouldn't prevent them from making
edits.
2015-10-22 20:14:43 -04:00
r888888888
6480864718 fixes #2469 2015-10-15 15:24:24 -07:00
Toks
1b6238aaef Add default blacklist 2015-07-30 11:11:20 -04:00
r888888888
67e46f6e5c fixes #2418 (includes hiding deleted dmails and allowing filtering on user name) 2015-07-07 17:32:38 -07:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
Toks
04fa5596e2 Favorite groups 2015-06-23 15:25:54 -04:00
r888888888
f02f72fac1 implement saved searches, move user boolean settings to bitprefs 2014-06-18 16:16:27 -07:00
Toks
71cd5ce783 fixes #2114 2014-05-29 22:55:35 -04:00
Toks
7fc16c14b1 fixes #1817 2013-07-12 18:29:11 -04:00
r888888888
f16f530eea fixes #1747 2013-06-18 16:06:48 -07:00
r888888888
d5f575159f rename references of privileged to gold 2013-04-28 00:04:52 -07:00
Toks
94984fb85a partial fix for #1363 (notice cannot be closed) 2013-04-22 19:42:39 -04:00
r888888888
e2a38ebc17 fixes #1284 2013-04-21 11:36:43 -07:00
Toks
53ee04d6a2 fixes #619 2013-04-17 20:09:48 -04:00
Toks
a5f1a6bad1 better comment creation errors 2013-04-02 13:34:28 -04:00
albert
2378e91006 fixes #841 2013-03-23 12:06:49 -04:00
albert
4dcc21a97a fixes #948 2013-03-22 10:47:24 -07:00
albert
3e4d149d28 fixes #959 2013-03-22 10:38:37 -07:00
albert
4606ec4763 priv users now have 6sec timeout, platinum users have 9sec timeout 2013-03-21 07:46:49 -07:00
albert
2ac22d07cd implement api limiting 2013-03-20 16:35:35 -07:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
a52eb3ddc2 fixes #848 2013-03-17 23:13:47 -04:00
albert
d907dfedbb add new options for moving nav links 2013-03-07 18:31:20 -05:00
albert
ad19ae5542 bug fixes 2013-03-06 01:13:41 -05:00
albert
73cce49fb0 add favorite tags to reltag js 2013-02-21 14:01:43 -05:00
albert
66fc05e30b change privileged accounts to gold accounts, add platinum accounts, add favorite and tag query limiting based on level 2013-02-20 00:02:43 -05:00
albert
34b0c14550 fixes 2013-02-19 11:56:23 -05:00
albert
7269ec0076 removed small image support 2012-03-13 18:28:32 -04:00