diff --git a/lib/pleroma/web/admin_api/controllers/import_controller.ex b/lib/pleroma/web/admin_api/controllers/import_controller.ex index 1effa4c857..30197774d6 100644 --- a/lib/pleroma/web/admin_api/controllers/import_controller.ex +++ b/lib/pleroma/web/admin_api/controllers/import_controller.ex @@ -12,7 +12,7 @@ defmodule Pleroma.Web.AdminAPI.ImportController do alias Pleroma.Web.ApiSpec alias Pleroma.Web.Plugs.OAuthScopesPlug - plug(OAuthScopesPlug, %{scopes: ["admin:write"]} when action == :collection) + plug(OAuthScopesPlug, %{scopes: ["admin:write"]} when action in [:collection, :archive]) plug(Pleroma.Web.ApiSpec.CastAndValidate) defdelegate open_api_operation(action), to: ApiSpec.Admin.ImportOperation diff --git a/lib/pleroma/web/pleroma_api/controllers/user_import_controller.ex b/lib/pleroma/web/pleroma_api/controllers/user_import_controller.ex index 9a107eab02..f0a79f3fdd 100644 --- a/lib/pleroma/web/pleroma_api/controllers/user_import_controller.ex +++ b/lib/pleroma/web/pleroma_api/controllers/user_import_controller.ex @@ -14,7 +14,7 @@ defmodule Pleroma.Web.PleromaAPI.UserImportController do plug(OAuthScopesPlug, %{scopes: ["follow", "write:follows"]} when action == :follow) plug(OAuthScopesPlug, %{scopes: ["follow", "write:blocks"]} when action == :blocks) plug(OAuthScopesPlug, %{scopes: ["follow", "write:mutes"]} when action == :mutes) - plug(OAuthScopesPlug, %{scopes: ["follow", "write:statuses"]} when action == :collection) + plug(OAuthScopesPlug, %{scopes: ["follow", "write:statuses"]} when action in [:collection, :archive]) plug(Pleroma.Web.ApiSpec.CastAndValidate, replace_params: false) defdelegate open_api_operation(action), to: ApiSpec.UserImportOperation