[bug] /api/v1/pleroma/admin/reports returns 403 for moderator #463

Closed
opened 2023-02-11 22:15:42 +00:00 by floogulinc · 1 comment

Your setup

OTP

Extra details

Ubuntu 22.04

Version

2023.02 (3.6.0-0-g71d0899)

PostgreSQL version

14.6 (Ubuntu 14.6-0ubuntu0.22.04.1)

What were you trying to do?

The frontend requests /api/v1/pleroma/admin/reports and I think that should return normally for a user with the moderator role.

What did you expect to happen?

The request to return normally.

What actually happened?

The request to /api/v1/pleroma/admin/reports returns a 403 error.

Logs

{"error":"Insufficient permissions: admin:read:reports."}

Severity

I can manage

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup OTP ### Extra details Ubuntu 22.04 ### Version 2023.02 (3.6.0-0-g71d0899) ### PostgreSQL version 14.6 (Ubuntu 14.6-0ubuntu0.22.04.1) ### What were you trying to do? The frontend requests `/api/v1/pleroma/admin/reports` and I think that should return normally for a user with the moderator role. ### What did you expect to happen? The request to return normally. ### What actually happened? The request to `/api/v1/pleroma/admin/reports` returns a 403 error. ### Logs ```json {"error":"Insufficient permissions: admin:read:reports."} ``` ### Severity I can manage ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
floogulinc added the
bug
label 2023-02-11 22:15:42 +00:00

issue was that i restricted the admin scope to be for admins only, forgetting that moderators need to grab it sometimes as well

issue was that i restricted the `admin` scope to be for admins only, forgetting that moderators need to grab it sometimes as well
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#463
No description provided.