summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrinpatch <rin@patch.cx>2021-02-17 20:47:38 +0300
committerrinpatch <rin@patch.cx>2021-02-17 20:47:38 +0300
commit6d66fadea7f798f64f4f8b5d41c9ef29469eaf78 (patch)
tree8b2dc3283128e35c3aaebfe238ad59779af73a42 /lib
parent679a2e799e464f044d7afceb4c9a650d2d3b2e2a (diff)
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.ex10
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