diff options
author | rinpatch <rin@patch.cx> | 2021-02-17 20:47:38 +0300 |
---|---|---|
committer | rinpatch <rin@patch.cx> | 2021-02-17 20:47:38 +0300 |
commit | 6d66fadea7f798f64f4f8b5d41c9ef29469eaf78 (patch) | |
tree | 8b2dc3283128e35c3aaebfe238ad59779af73a42 /lib | |
parent | 679a2e799e464f044d7afceb4c9a650d2d3b2e2a (diff) | |
download | pleroma-6d66fadea7f798f64f4f8b5d41c9ef29469eaf78.tar.gz pleroma-6d66fadea7f798f64f4f8b5d41c9ef29469eaf78.zip |
Remove `:auth, :enforce_oauth_admin_scope_usage`
`admin` scope has been required by default for more than a year now
and all apps that use the API seems to request a proper scope by now.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/config.ex | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/pleroma/config.ex b/lib/pleroma/config.ex index f17e14128..b35491fdc 100644 --- a/lib/pleroma/config.ex +++ b/lib/pleroma/config.ex @@ -100,15 +100,7 @@ defmodule Pleroma.Config do def oauth_consumer_enabled?, do: oauth_consumer_strategies() != [] - def enforce_oauth_admin_scope_usage?, do: !!get([:auth, :enforce_oauth_admin_scope_usage]) - def oauth_admin_scopes(scopes) when is_list(scopes) do - Enum.flat_map( - scopes, - fn scope -> - ["admin:#{scope}"] ++ - if enforce_oauth_admin_scope_usage?(), do: [], else: [scope] - end - ) + Enum.map(scopes, fn scope -> "admin:#{scope}" end) end end |