mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
correctly return access rights in auth redirect
This commit is contained in:
@ -2,7 +2,8 @@ class UserApiKey < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
|
||||
def access
|
||||
"#{read ? "r" : ""}#{write ? "w" : ""}#{push ? "p" : ""}"
|
||||
has_push = push && push_url.present? && SiteSetting.allowed_user_api_push_urls.include?(push_url)
|
||||
"#{read ? "r" : ""}#{write ? "w" : ""}#{has_push ? "p" : ""}"
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user