projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into feature/report-notes
[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 d34952cda5d17b9c15f7c4e1095d02d6bc7b380a..7c783f91924d87011712413f1c1d0df90df39189 100644
(file)
--- a/
lib/pleroma/web/admin_api/admin_api_controller.ex
+++ b/
lib/pleroma/web/admin_api/admin_api_controller.ex
@@
-31,13
+31,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,
@@
-59,35
+59,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]
)
@@
-650,11
+652,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