Merge branch 'feature/support-bot-field-in-update-credentials' into 'develop'
[akkoma] / lib / pleroma / plugs / user_is_admin_plug.ex
index 582fb1f9275ca6babdf930f0abc3a0225206cc15..2748102dff6e90bcdc21e9a9c4051b2d79cbe965 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Plugs.UserIsAdminPlug do
@@ -23,6 +23,7 @@ defmodule Pleroma.Plugs.UserIsAdminPlug do
       token && OAuth.Scopes.contains_admin_scopes?(token.scopes) ->
         # Note: checking for _any_ admin scope presence, not necessarily fitting requested action.
         #   Thus, controller must explicitly invoke OAuthScopesPlug to verify scope requirements.
+        #   Admin might opt out of admin scope for some apps to block any admin actions from them.
         conn
 
       true ->