diff --git a/web/components/headers/project-view-issues.tsx b/web/components/headers/project-view-issues.tsx index 827997f7b..a4428f633 100644 --- a/web/components/headers/project-view-issues.tsx +++ b/web/components/headers/project-view-issues.tsx @@ -17,6 +17,7 @@ import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOption import { ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "constants/issue"; import { EFilterType } from "store/issues/types"; import { EProjectStore } from "store/command-palette.store"; +import { EUserWorkspaceRoles } from "constants/workspace"; export const ProjectViewIssuesHeader: React.FC = observer(() => { const router = useRouter(); @@ -35,6 +36,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { viewIssuesFilter: { issueFilters, updateFilters }, commandPalette: commandPaletteStore, trackEvent: { setTrackElement }, + user: { currentProjectRole }, } = useMobxStore(); const activeLayout = issueFilters?.displayFilters?.layout; @@ -85,6 +87,9 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { const viewsList = projectId ? projectViewsStore.viewsList[projectId.toString()] : undefined; const viewDetails = viewId ? projectViewsStore.viewDetails[viewId.toString()] : undefined; + const canUserCreateIssue = + currentProjectRole && [EUserWorkspaceRoles.ADMIN, EUserWorkspaceRoles.MEMBER].includes(currentProjectRole); + return (