[#468] Refactored OAuth scopes' defaults & missing selection handling.

This commit is contained in:
Ivan Tashkinov 2019-02-17 13:49:14 +03:00
commit dcf24a3233
5 changed files with 28 additions and 30 deletions

View file

@ -6,6 +6,7 @@ defmodule Pleroma.Web.ControllerHelper do
use Pleroma.Web, :controller
def oauth_scopes(params, default) do
# Note: `scopes` is used by Mastodon — supporting it but sticking to OAuth's standard `scope` wherever we control it
Pleroma.Web.OAuth.parse_scopes(params["scope"] || params["scopes"], default)
end