aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-08-07 09:48:34 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-08-07 09:48:34 +0300
commit8e90cc58e7ec3f19f03d049ff541750f1ab4774e (patch)
treebe0a4346827a52fcdfe034c489ede989320a24d2 /lib/pleroma/web/oauth/oauth_controller.ex
parent6e6276b4f8a7a46c6038480f6a842339c5214d1c (diff)
parentb9ebb55d2aabdf4c99b05efab9d4ad31b25f888d (diff)
downloadpleroma-8e90cc58e7ec3f19f03d049ff541750f1ab4774e.tar.gz
Merge branch 'develop' into feature/update-welcome-setting-in-description
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"],