Commit Graph

60 Commits

Author SHA1 Message Date
Albert Yi
da34c95da5 add expiry parameter 2018-05-22 14:57:46 -07:00
Albert Yi
72d72fd3d0 eliminate usage of localstorage to cache tag autocomplete results (fixes #3543) 2018-05-17 09:54:37 -07:00
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
evazion
f7a44ae8dd Fix redirect in "disable responsive mode" link. 2018-04-26 21:31:53 -05:00
evazion
909c9aad5a Fix user id cache expiration.
Use a delayed job instead of a HTTP request to invalidate the user id
cache on both servers.
2018-04-19 00:45: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
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
evazion
1fc2284874 /users/new: show error message when account signup fails. 2017-12-27 13:34:20 -06:00
r888888888
a95af95eae move desktop mode to user pref 2017-12-15 13:52:25 -08:00
evazion
8d8a2f9c1e Make recaptcha optional on signup page. 2017-11-29 18:09:37 -06:00
r888888888
01240f3a10 add option for desktop mode in user settings 2017-09-25 15:26:11 -07:00
r888888888
704816066d add recaptcha for signup process 2017-09-16 12:44:17 -07:00
evazion
6682ae10eb /users/:id/edit: redirect back to settings instead of profile. 2017-07-21 01:18:42 -05:00
evazion
cda1ee3d88 /users: allow banned users to edit account settings.
The member_only check prevents banned users from editing their account
settings. This isn't needed since check_privilege handles the privilege check.
2017-07-06 18:39:42 -05:00
evazion
d5b9b7162c /user_upgrades/new: fix page wrapper id.
* Move related css to user_upgrades.scss.
* Delete users/upgrade_information.html.erb as it is unused.
2017-05-22 13:07:31 -05:00
evazion
e10327219d /users/1234.json: include upload_limit/max_upload_limit/favorite_group_count. 2017-04-29 12:26:25 -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
Albert Yi
f2a5d45db0 implement token bucket rate limiting 2017-01-09 17:31:14 -08:00
r888888888
f41c362bf4 keep better track of per-user ip addrs 2016-08-24 15:58:22 -07:00
Toks
c251e7fd3f Better error when linking to username that doesn't exist 2015-11-20 21:55:32 -05:00
r888888888
b695a7980f unify user notifications for permission/level changes #2470 2015-10-27 11:12:05 -07:00
r888888888
3a81f1ee8e fixes #2470: Neutral records to keep track of permissions 2015-10-26 14:27:34 -07:00
r888888888
1abdcb3cf3 fixes #2419 2015-06-30 13:21:39 -07:00
r888888888
cbf48ad948 add stripe integration for safebooru 2014-11-06 17:03:17 -08:00
Toks
f132e42a12 Fix user renames and deletions
related to #1941
2014-05-30 02:57:23 -04:00
r888888888
cc9b5a0c61 Create new transaction log table to track user conversions 2014-02-10 13:35:39 -08:00
Toks
657606cb73 #1323: Limit to user show pages 2013-12-15 19:55:28 -05:00
Toks
e83fde873e fixes #2035 2013-11-20 15:48:51 -05:00
Toks
06805bc6ad fixes #1778 2013-06-20 18:23:53 -04:00
r888888888
af25507480 fixes #813 2013-06-10 16:33:26 -07:00
Toks
9ccf1e0f8f add limit parameter to everything 2013-05-15 01:01:19 -04:00
Toks
eeadd6b211 fixes #1097 2013-05-13 15:30:51 -04:00
r888888888
6c5887c94a fixes #1285 2013-04-16 20:49:51 -07:00
albert
56f1e19f67 fixes #1209 2013-04-09 18:05:23 -04:00
albert
541dabaaf6 fixes #1108 2013-03-29 15:37:28 -04:00
albert
d43698cfff fixes #1027 2013-03-21 16:16:28 -07:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
2b5a44a4fa fixes #774 2013-03-08 16:46:47 -05: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
eb5e526678 enable uploads 2013-02-17 21:39:15 -05:00
albert
44682156c0 fix searches 2013-02-17 21:09:25 -05:00
albert
7434c164a3 fixes #310 2012-02-20 15:34:13 -05:00
albert
393b071fa1 fixes #311 2012-02-20 15:33:42 -05:00
albert
5e3b243b67 users with no negative feedback can now change their names 2011-12-20 16:18:35 -05:00
albert
8e3a6c5923 style fixes 2011-12-06 18:58:26 -05:00
albert
4baf5be7a2 added upgrade mailer 2011-12-02 16:46:37 -05:00
albert
1d4ce259a8 revert testing changes 2011-11-18 18:09:23 -05:00
albert
e8ac9cfcc1 users can now select their level when signing up (for testing only) 2011-10-21 17:29:41 -04:00
albert
4d1d45d70e fixes #48: Adding email via profile 2011-09-15 18:02:00 -04:00