Commit Graph

468 Commits

Author SHA1 Message Date
evazion
23fb6b8d15 /users/$id.json: fix exception when pool archives is disabled (fix #3123). 2017-06-07 22:54:16 -05:00
Albert Yi
92c4c043f0 Merge pull request #3032 from evazion/fix-expired-bans
Fix exception when user with expired ban logs in.
2017-05-08 11:33:44 -07:00
evazion
fd291c8b42 bans: fix exception when user with expired ban logs in.
`ban.destroy` fails because users have many `bans`, not a single `ban`.
Destroying the expired ban isn't necessary anyway.
2017-05-07 12:13:19 -05:00
evazion
43ad3258e5 API: fix api limits being lowered when user doesn't have api key. 2017-05-04 12:57:20 -05:00
r888888888
48e9856f37 fixes #3007: Eliminate Janitor role 2017-05-01 14:38:30 -07:00
evazion
e10327219d /users/1234.json: include upload_limit/max_upload_limit/favorite_group_count. 2017-04-29 12:26:25 -05:00
evazion
f7509433b1 /users.json: make private attributes visible to the user themselves (fix #1551). 2017-04-29 12:26:24 -05:00
evazion
258fc37bfe Post#approve!: move validation to post_approval.rb 2017-04-03 17:18:31 -05:00
evazion
fd24ea5876 posts.rb: vote on behalf of correct user when moving favorites.
Bug: when an approver moves the favorites of a post, each favorite is
removed from the child post and added to the parent post. For gold+
users, this triggers an upvote, but these upvotes were performed by the
approver rather than the favoriter.
2017-03-24 15:43:28 -05:00
r888888888
da06bee0ab revamp saved search implementation 2017-03-15 15:36:48 -07:00
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