Commit Graph

258 Commits

Author SHA1 Message Date
r888888888
97cc8b5931 ignore privacy mode settings for admins 2017-03-09 13:52:46 -08:00
r888888888
e94edc9a75 switch approver and post pruners to use system user 2017-02-28 17:10:36 -08:00
evazion
6966b74e18 Disallow unicode whitespace in usernames (#2894). 2017-02-25 01:51:33 -06:00
evazion
7486bb0add Fix #2851: Account deletion should remove name change requests.
Hides name change requests for deleted users (username matches /user_[0-9]+~*/).
2017-01-19 22:32:13 +00:00
Albert Yi
ae442c3391 fixes #2760: unable to register an account with a blank email 2017-01-16 14:56:08 -08:00
evazion
1f325c19da Show previous usernames to members; link to actual change requests. 2017-01-11 13:07:39 -06:00
Albert Yi
f2a5d45db0 implement token bucket rate limiting 2017-01-09 17:31:14 -08:00
Albert Yi
4d698bf98b add modaction helper 2017-01-03 15:04:47 -08:00
Albert Yi
74d02bde44 fixes #2812: StatementInvalid exception on all Profile Pages 2016-12-29 14:39:55 -08:00
evazion
c292587edb Add missing :platinum role to user/tag/dmail_filter attr_accessible lists. 2016-12-29 16:19:36 -06:00
evazion
6645847857 Simplify User#role. 2016-12-29 15:56:48 -06:00
evazion
d2e9ff363b Fix bug preventing Platinum users from commenting.
Bug:

Platinum users get this error when commenting:

    No route matches {:action=>"show", :controller=>"posts", :id=>nil}
    missing required keys: [:id]

Fix:

The issue was that `CurrentUser.role` was nil for Platinum users, which
caused `Comment.create(create_params, :as => CurrentUser.role)` to
silently ignore the create_params because the nil role wasn't in the
attr_accessible whitelist.

Despite this, things worked accidentally for other models because they
had `attr_accessible ..., :as => [:default]` in their whitelists where
the comment model didn't.
2016-12-29 15:45:23 -06:00
Albert Yi
62956be384 hide saved search functionality if not enabled 2016-12-21 14:53:39 -08:00
evazion
18d2d0b6b8 Fix private forum topic bumping for users below min level. 2016-10-30 18:00:26 -05:00
evazion
0dcd7e82be Test forum posts generated by tag alias approval. 2016-10-26 21:52:19 -05: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
Albert Yi
25028f0c7f increase api limit for platinum 2016-10-19 13:00:36 -07:00
Albert Yi
87447a51c3 work on #2693 Separate API Limits by Writes/Reads 2016-10-17 16:37:11 -07:00
evazion
bd6ebceda3 Refactor post_approvers_only to approver_only.
Don't duplicate code with post_approvers_only; use the approver_only?
method dynamically defined in `User::Roles.each do ... end`.
2016-10-14 05:04:40 +00:00
evazion
d84184b5f1 Prevent anon/banned/member users from voting (fix #2719).
There was a regression in 6d6d00b; `before_filter :voter_only` was a
no-op in the post vote controller because it merely returned false,
which does not halt the request. The fix is to arrange for a voter_only
method to be defined that properly redirects to the access denied page.
2016-10-14 04:47:51 +00:00
Albert Yi
4bdca44f2e Merge pull request #2702 from evazion/fix/set-admin-permissions
Give full permissions to the starting admin.
2016-10-05 12:46:26 -07:00
evazion
e86a7ae957 Give approve/upload/supervoter permissions to first admin. 2016-10-05 02:15:04 +00:00
evazion
c3b55e80c5 Make default user level and settings configurable.
Remove start_as_gold? and start_as_contributor? from default config
because they don't actually do anything. `git log -G start_as` indicates
they never have done anything.

Add a more general customize_new_user method for setting the starting
user level, permissions and defaults for any other settings.
2016-10-05 01:39:08 +00:00
Albert Yi
c776fb478a Revert "Index and form for bit preferences" 2016-09-23 16:21:09 -07:00
Type-kun
e7586f4e4a Add is_banned to user search params 2016-09-23 11:52:43 -07:00
Type-kun
2e4385b6cd Change user prefs search logic to use index (#2644)
Sadly, array index failed to cover "unset bits" case,
so excluded bits are merged into bigint, and &'d with column,
which turned out more readable and simpler than bit string.
2016-09-23 11:52:43 -07:00
r888888888
1f3515817c fix bug with empty string saved search categories 2016-09-11 01:10:09 -07:00
Type-kun
42f3a4a554 Initial support for #2644 2016-09-11 01:06:27 +05:00
Type-kun
66f0e71c3d Fix duplicate saved search categories in user profile 2016-08-31 00:18:41 +05:00
Type-kun
92b5e5e00d Display supervoter pref in API and CSS (#2641) 2016-08-27 16:11:48 +05:00
Type-kun
ffbf6b6fa0 Display user permissions in API results
Fixes #2640
2016-08-26 21:51:33 +05:00
r888888888
f41c362bf4 keep better track of per-user ip addrs 2016-08-24 15:58:22 -07:00
r888888888
c3b78b1752 add user searches 2016-08-23 18:20:21 -07:00
r888888888
d0bbe27217 include saved searches section in user profiles 2016-08-22 14:59:43 -07:00
r888888888
f5ee618342 fixes #2640: Change some API representations 2016-08-22 10:41:34 -07:00
r888888888
5de9adf0f5 work on saved searches embedded in user profiles 2016-08-19 17:33:42 -07:00
r888888888
d46c6f67b8 fixes #2626: Bypass can_upload? checks for administrators 2016-07-20 12:34:34 -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
r888888888
2a87aad34e implement super voters 2016-02-22 14:11:25 -08:00
r888888888
caf4a28b02 enable user privacy mode for displaying favorites 2016-02-22 12:18:19 -08:00
r888888888
3221ff08f8 hide last_ip_addr field in api responses for users 2015-12-28 12:44:04 -08:00
r888888888
89794a7ef2 add saved search gallery link, can only view your own saved searches, normalize saved search categories 2015-11-24 16:41:03 -08: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
09ca8df6b3 change user deletion scope from 120 days to 60 days 2015-10-19 14:33:05 -07:00
r888888888
6480864718 fixes #2469 2015-10-15 15:24:24 -07:00
Toks
f694c780c6 Forum activity indicator: don't count deleted topics as unread 2015-10-01 14:07:17 -04:00