v1.5.1: fix auditor activity logs permissions

This commit is contained in:
abhishek9686
2026-04-02 15:18:09 +05:30
parent 96d680bfc8
commit 675f096d32
+2 -1
View File
@@ -106,7 +106,8 @@ func listUserActivity(w http.ResponseWriter, r *http.Request) {
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
return
}
if caller.Username != username && caller.PlatformRoleID != schema.SuperAdminRole && caller.PlatformRoleID != schema.AdminRole {
if caller.Username != username && caller.PlatformRoleID != schema.SuperAdminRole &&
caller.PlatformRoleID != schema.AdminRole && caller.PlatformRoleID != schema.Auditor {
logic.ReturnErrorResponse(w, r, models.ErrorResponse{
Code: http.StatusForbidden,
Message: "you are not authorized to view this user's activity",