[#1427] Reworked admin scopes support.
Requalified users.is_admin flag as legacy accessor to admin actions in case token lacks admin scope(s).
This commit is contained in:
parent
51111e286b
commit
af42c00cff
11 changed files with 82 additions and 30 deletions
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Web.PleromaAPI.EmojiAPIController do
|
|||
|
||||
plug(
|
||||
OAuthScopesPlug,
|
||||
%{scopes: ["admin:write", "write"]}
|
||||
%{scopes: Pleroma.Config.oauth_admin_scopes("write")}
|
||||
when action in [
|
||||
:create,
|
||||
:delete,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue