projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'features/reports-enhancements' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
admin_api
/
controllers
/
admin_api_controller.ex
diff --git
a/lib/pleroma/web/admin_api/controllers/admin_api_controller.ex
b/lib/pleroma/web/admin_api/controllers/admin_api_controller.ex
index 8f89f066ab2eefce89654a58cb5b958bb1b97a18..839ac1a8d9185381f56cc84ff14122da63cfb899 100644
(file)
--- a/
lib/pleroma/web/admin_api/controllers/admin_api_controller.ex
+++ b/
lib/pleroma/web/admin_api/controllers/admin_api_controller.ex
@@
-25,13
+25,13
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIController do
plug(
OAuthScopesPlug,
plug(
OAuthScopesPlug,
- %{scopes: ["
read:accounts"], admin: true
}
+ %{scopes: ["
admin:read:accounts"]
}
when action in [:right_get, :show_user_credentials, :create_backup]
)
plug(
OAuthScopesPlug,
when action in [:right_get, :show_user_credentials, :create_backup]
)
plug(
OAuthScopesPlug,
- %{scopes: ["
write:accounts"], admin: true
}
+ %{scopes: ["
admin:write:accounts"]
}
when action in [
:get_password_reset,
:force_password_reset,
when action in [
:get_password_reset,
:force_password_reset,
@@
-48,19
+48,19
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIController do
plug(
OAuthScopesPlug,
plug(
OAuthScopesPlug,
- %{scopes: ["
read:statuses"], admin: true
}
+ %{scopes: ["
admin:read:statuses"]
}
when action in [:list_user_statuses, :list_instance_statuses]
)
plug(
OAuthScopesPlug,
when action in [:list_user_statuses, :list_instance_statuses]
)
plug(
OAuthScopesPlug,
- %{scopes: ["
read:chats"], admin: true
}
+ %{scopes: ["
admin:read:chats"]
}
when action in [:list_user_chats]
)
plug(
OAuthScopesPlug,
when action in [:list_user_chats]
)
plug(
OAuthScopesPlug,
- %{scopes: ["
read"], admin: true
}
+ %{scopes: ["
admin:read"]
}
when action in [
:list_log,
:stats,
when action in [
:list_log,
:stats,
@@
-70,7
+70,7
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIController do
plug(
OAuthScopesPlug,
plug(
OAuthScopesPlug,
- %{scopes: ["
write"], admin: true
}
+ %{scopes: ["
admin:write"]
}
when action in [
:restart,
:resend_confirmation_email,
when action in [
:restart,
:resend_confirmation_email,
@@
-406,7
+406,7
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIController do
if Config.get(:configurable_from_database) do
:ok
else
if Config.get(:configurable_from_database) do
:ok
else
- {:error, "
To use this endpoint you need to enable configuration from databas
e."}
+ {:error, "
You must enable configurable_from_database in your config fil
e."}
end
end
end
end