mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: Convert min_trust_level_for_user_api_key to groups (#25299)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_level_for_user_api_key site setting to user_api_key_allowed_groups. This isn't used by any of our plugins or themes, so very little fallout.
This commit is contained in:
@ -183,7 +183,7 @@ class UserApiKeysController < ApplicationController
|
||||
end
|
||||
|
||||
def meets_tl?
|
||||
current_user.staff? || current_user.trust_level >= SiteSetting.min_trust_level_for_user_api_key
|
||||
current_user.staff? || current_user.in_any_groups?(SiteSetting.user_api_key_allowed_groups_map)
|
||||
end
|
||||
|
||||
def one_time_password(public_key, username)
|
||||
|
Reference in New Issue
Block a user