projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'chore/fast_sanitize_bump' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
admin_api
/
admin_api_controller.ex
diff --git
a/lib/pleroma/web/admin_api/admin_api_controller.ex
b/lib/pleroma/web/admin_api/admin_api_controller.ex
index 24fdc3c821920759735e7372d2bfe8a877f0c7d5..0a8a56cd8950b80faff6e88ba4ba54eaf93df99e 100644
(file)
--- a/
lib/pleroma/web/admin_api/admin_api_controller.ex
+++ b/
lib/pleroma/web/admin_api/admin_api_controller.ex
@@
-30,13
+30,13
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIController do
plug(
OAuthScopesPlug,
plug(
OAuthScopesPlug,
- %{scopes: ["read:accounts"]}
+ %{scopes: ["read:accounts"]
, admin: true
}
when action in [:list_users, :user_show, :right_get, :invites]
)
plug(
OAuthScopesPlug,
when action in [:list_users, :user_show, :right_get, :invites]
)
plug(
OAuthScopesPlug,
- %{scopes: ["write:accounts"]}
+ %{scopes: ["write:accounts"]
, admin: true
}
when action in [
:get_invite_token,
:revoke_invite,
when action in [
:get_invite_token,
:revoke_invite,
@@
-58,35
+58,37
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIController do
plug(
OAuthScopesPlug,
plug(
OAuthScopesPlug,
- %{scopes: ["read:reports"]} when action in [:list_reports, :report_show]
+ %{scopes: ["read:reports"], admin: true}
+ when action in [:list_reports, :report_show]
)
plug(
OAuthScopesPlug,
)
plug(
OAuthScopesPlug,
- %{scopes: ["write:reports"]}
+ %{scopes: ["write:reports"]
, admin: true
}
when action in [:report_update_state, :report_respond]
)
plug(
OAuthScopesPlug,
when action in [:report_update_state, :report_respond]
)
plug(
OAuthScopesPlug,
- %{scopes: ["read:statuses"]} when action == :list_user_statuses
+ %{scopes: ["read:statuses"], admin: true}
+ when action == :list_user_statuses
)
plug(
OAuthScopesPlug,
)
plug(
OAuthScopesPlug,
- %{scopes: ["write:statuses"]}
+ %{scopes: ["write:statuses"]
, admin: true
}
when action in [:status_update, :status_delete]
)
plug(
OAuthScopesPlug,
when action in [:status_update, :status_delete]
)
plug(
OAuthScopesPlug,
- %{scopes: ["read"]}
+ %{scopes: ["read"]
, admin: true
}
when action in [:config_show, :migrate_to_db, :migrate_from_db, :list_log]
)
plug(
OAuthScopesPlug,
when action in [:config_show, :migrate_to_db, :migrate_from_db, :list_log]
)
plug(
OAuthScopesPlug,
- %{scopes: ["write"]}
+ %{scopes: ["write"]
, admin: true
}
when action in [:relay_follow, :relay_unfollow, :config_update]
)
when action in [:relay_follow, :relay_unfollow, :config_update]
)
@@
-647,11
+649,11
@@
defmodule Pleroma.Web.AdminAPI.AdminAPIController do
end
def list_grouped_reports(conn, _params) do
end
def list_grouped_reports(conn, _params) do
-
report
s = Utils.get_reported_activities()
+
statuse
s = Utils.get_reported_activities()
conn
|> put_view(ReportView)
conn
|> put_view(ReportView)
- |> render("index_grouped.json", Utils.get_reports_grouped_by_status(
report
s))
+ |> render("index_grouped.json", Utils.get_reports_grouped_by_status(
statuse
s))
end
def report_show(conn, %{"id" => id}) do
end
def report_show(conn, %{"id" => id}) do