You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
API: is_restricted_guest returns True for workspace admins holding a project GUEST role #10118
While testing external API permissions on preview (commit 7805576), I noticed is_restricted_guest(user_id, project_id, slug) in apps/api/plane/api/views/issue.py (lines 199-217) returns True whenever the user has a ProjectMember row with role=ROLE.GUEST.value and project__guest_view_all_features=False, without checking whether the user is an active workspace admin (WorkspaceMember with role=ROLE.ADMIN.value).
In IntakeIssueDetailAPIEndpoint.delete (apps/api/plane/api/views/intake.py lines 494-511), even though lines 508-510 explicitly allow workspace admins (WorkspaceMember.objects.filter(..., role=20, is_active=True).exists()), line 494 calls is_restricted_guest first and raises IntakeIssue.DoesNotExist() (404) before reaching line 508 (and the other is_restricted_guest / guest_cannot_view_issue callers in intake.py, cycle.py, and module.py also block workspace admins who hold a project guest role). Should is_restricted_guest return False when the user is a workspace admin? Happy to open a quick PR if you want!
is_restricted_guest (apps/api/plane/api/views/issue.py): Now checks is_project_or_workspace_admin and WorkspaceMember.objects.filter(..., role=ROLE.ADMIN.value, is_active=True), returning False when the caller is an active workspace or project admin.
visible_issue_q (apps/api/plane/api/views/issue.py): Added an active workspace admin branch so workspace search queries return all project issues rather than restricting to created_by=user.
issue_hidden_from_guest (apps/api/plane/app/permissions/base.py): Added an active workspace admin check to return False, matching its documented intent ("Returns False for admins, members, unrestricted guests...").
Contract Tests: Added TestWorkspaceAdminWithProjectGuestRoleScope covering issue detail access, issue listing, intake issue deletion, and is_restricted_guest evaluation for workspace admins holding a project GUEST role.
Activity
ghazy2001 commentedon Oct 28, 2026
Opened PR #10134 addressing this:
is_restricted_guest(apps/api/plane/api/views/issue.py): Now checksis_project_or_workspace_adminandWorkspaceMember.objects.filter(..., role=ROLE.ADMIN.value, is_active=True), returningFalsewhen the caller is an active workspace or project admin.visible_issue_q(apps/api/plane/api/views/issue.py): Added an active workspace admin branch so workspace search queries return all project issues rather than restricting tocreated_by=user.issue_hidden_from_guest(apps/api/plane/app/permissions/base.py): Added an active workspace admin check to returnFalse, matching its documented intent ("Returns False for admins, members, unrestricted guests...").TestWorkspaceAdminWithProjectGuestRoleScopecovering issue detail access, issue listing, intake issue deletion, andis_restricted_guestevaluation for workspace admins holding a project GUEST role.