aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-25 11:44:51 +0200
committerlain <lain@soykaf.club>2020-08-25 11:44:51 +0200
commitc1d51944c71ff90650b1a631241daf0d8be5b861 (patch)
tree2e78efaeb892c4b09cac0439f268d6a60637b4dc /lib/pleroma/web/oauth/oauth_controller.ex
parent199ad47c22e5d72741f5809eb015bac9b00cca03 (diff)
parent5722b0e2e5e7113f0422798a6ea8cc40d1953291 (diff)
downloadpleroma-c1d51944c71ff90650b1a631241daf0d8be5b861.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into frontend-bundles-downloads
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r--lib/pleroma/web/oauth/oauth_controller.ex7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex
index f29b3cb57..dd00600ea 100644
--- a/lib/pleroma/web/oauth/oauth_controller.ex
+++ b/lib/pleroma/web/oauth/oauth_controller.ex
@@ -76,6 +76,13 @@ defmodule Pleroma.Web.OAuth.OAuthController do
available_scopes = (app && app.scopes) || []
scopes = Scopes.fetch_scopes(params, available_scopes)
+ scopes =
+ if scopes == [] do
+ available_scopes
+ else
+ scopes
+ end
+
# Note: `params` might differ from `conn.params`; use `@params` not `@conn.params` in template
render(conn, Authenticator.auth_template(), %{
response_type: params["response_type"],