mirror of
https://github.com/mastodon/mastodon
synced 2024-11-24 07:06:18 +09:00
Restrict access to oauth/applications to admins only
This commit is contained in:
parent
b746a931a5
commit
720d1f8f3d
@ -15,7 +15,7 @@ Doorkeeper.configure do
|
|||||||
|
|
||||||
# If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
|
# If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
|
||||||
admin_authenticator do
|
admin_authenticator do
|
||||||
current_user || redirect_to(new_user_session_url)
|
(current_user && current_user.admin?) || redirect_to(new_user_session_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Authorization Code expiration time (default 10 minutes).
|
# Authorization Code expiration time (default 10 minutes).
|
||||||
|
Loading…
Reference in New Issue
Block a user