From 7beafa838c6372450800282f0e5ed86a30486523 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 11 Oct 2024 22:01:39 +0530 Subject: [PATCH 1/2] fix: intake exception error (#5810) --- web/core/components/inbox/content/root.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/components/inbox/content/root.tsx b/web/core/components/inbox/content/root.tsx index 504b1d593a..78e682340c 100644 --- a/web/core/components/inbox/content/root.tsx +++ b/web/core/components/inbox/content/root.tsx @@ -64,7 +64,7 @@ export const InboxContentRoot: FC = observer((props) => { const isEditable = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.PROJECT) || - inboxIssue.created_by === currentUser?.id; + inboxIssue?.created_by === currentUser?.id; const isGuest = projectPermissionsByWorkspaceSlugAndProjectId(workspaceSlug, projectId) === EUserPermissions.GUEST; const isOwner = inboxIssue?.issue.created_by === currentUser?.id; From e4ace2e05cae8e849d1bd2bfdac207f9710c1169 Mon Sep 17 00:00:00 2001 From: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com> Date: Fri, 11 Oct 2024 22:23:18 +0530 Subject: [PATCH 2/2] chore: filtered active cycles for guest (#1468) --- .../plane/ee/views/app/cycle/active_cycle.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apiserver/plane/ee/views/app/cycle/active_cycle.py b/apiserver/plane/ee/views/app/cycle/active_cycle.py index f51c0aff63..e0635e2dd4 100644 --- a/apiserver/plane/ee/views/app/cycle/active_cycle.py +++ b/apiserver/plane/ee/views/app/cycle/active_cycle.py @@ -1,9 +1,5 @@ # Django imports -from django.db.models import ( - Exists, - OuterRef, - Prefetch, -) +from django.db.models import Exists, OuterRef, Prefetch, Q from django.utils import timezone # Module imports @@ -69,6 +65,15 @@ class WorkspaceActiveCycleEndpoint(BaseAPIView): .order_by("-is_favorite", "name") .distinct() ) + + active_cycles = active_cycles.filter( + ~Q( + project__project_projectmember__role=5, + project__project_projectmember__member=self.request.user, + project__project_projectmember__is_active=True, + ) + ) + return self.paginate( request=request, queryset=active_cycles,