Skip to content

Commit c7a6a92

Browse files
security(authz): gate mark_revoked on ALLOW_USER_OFFBOARD, not the read perm (F-006)
mark_revoked performs a destructive cross-user access revocation but was gated only by @user_with_permission(["VIEW_USER_ACCESS_LIST"]) — a read permission. Any holder of that read perm could revoke any user's access (CTO-4858, CVSS 8.1 IDOR). Switch to ALLOW_USER_OFFBOARD, the permission already used to authorize revocation/offboarding elsewhere (group_helper.revoke_access_from_group, models User.offboard). The read view all_user_access_list keeps VIEW_USER_ACCESS_LIST. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0ae4f0b commit c7a6a92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Access/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def all_user_access_list(request, load_ui=True):
575575

576576

577577
@login_required
578-
@user_with_permission(["VIEW_USER_ACCESS_LIST"])
578+
@user_with_permission(["ALLOW_USER_OFFBOARD"])
579579
def mark_revoked(request):
580580
"""Revoke an access
581581

0 commit comments

Comments
 (0)