Make backups require its own scope

This commit is contained in:
Tusooa Zhu 2022-08-09 00:34:04 -04:00
commit a7f01ffc1d
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ defmodule Pleroma.Web.PleromaAPI.BackupController do
alias Pleroma.Web.Plugs.OAuthScopesPlug
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
plug(OAuthScopesPlug, %{scopes: ["read:accounts"]} when action in [:index, :create])
plug(OAuthScopesPlug, %{scopes: ["read:backups"]} when action in [:index, :create])
plug(Pleroma.Web.ApiSpec.CastAndValidate)
defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.PleromaBackupOperation