Merge branch 'mkljczk-develop-patch-53771' into 'develop'
Move admin routes outside wrong role See merge request soapbox-pub/rebased!255
This commit is contained in:
commit
7fd0b30905
1 changed files with 11 additions and 11 deletions
|
@ -286,11 +286,6 @@ defmodule Pleroma.Web.Router do
|
|||
post("/frontends/install", FrontendController, :install)
|
||||
|
||||
post("/backups", AdminAPIController, :create_backup)
|
||||
end
|
||||
|
||||
# AdminAPI: admins and mods (staff) can perform these actions (if privileged by role)
|
||||
scope "/api/v1/pleroma/admin", Pleroma.Web.AdminAPI do
|
||||
pipe_through(:require_privileged_role_announcements_manage_announcements)
|
||||
|
||||
get("/email_list/subscribers.csv", EmailListController, :subscribers)
|
||||
get("/email_list/unsubscribers.csv", EmailListController, :unsubscribers)
|
||||
|
@ -301,12 +296,6 @@ defmodule Pleroma.Web.Router do
|
|||
patch("/rules/:id", RuleController, :update)
|
||||
delete("/rules/:id", RuleController, :delete)
|
||||
|
||||
get("/announcements", AnnouncementController, :index)
|
||||
post("/announcements", AnnouncementController, :create)
|
||||
get("/announcements/:id", AnnouncementController, :show)
|
||||
patch("/announcements/:id", AnnouncementController, :change)
|
||||
delete("/announcements/:id", AnnouncementController, :delete)
|
||||
|
||||
get("/webhooks", WebhookController, :index)
|
||||
get("/webhooks/:id", WebhookController, :show)
|
||||
post("/webhooks", WebhookController, :create)
|
||||
|
@ -317,6 +306,17 @@ defmodule Pleroma.Web.Router do
|
|||
post("/webhooks/:id/rotate_secret", WebhookController, :rotate_secret)
|
||||
end
|
||||
|
||||
# AdminAPI: admins and mods (staff) can perform these actions (if privileged by role)
|
||||
scope "/api/v1/pleroma/admin", Pleroma.Web.AdminAPI do
|
||||
pipe_through(:require_privileged_role_announcements_manage_announcements)
|
||||
|
||||
get("/announcements", AnnouncementController, :index)
|
||||
post("/announcements", AnnouncementController, :create)
|
||||
get("/announcements/:id", AnnouncementController, :show)
|
||||
patch("/announcements/:id", AnnouncementController, :change)
|
||||
delete("/announcements/:id", AnnouncementController, :delete)
|
||||
end
|
||||
|
||||
# AdminAPI: admins and mods (staff) can perform these actions (if privileged by role)
|
||||
scope "/api/v1/pleroma/admin", Pleroma.Web.AdminAPI do
|
||||
pipe_through(:require_privileged_role_users_delete)
|
||||
|
|
Loading…
Reference in a new issue