fix: Permission levels for project settings (#2978)

* fix add subgroup issue FED-1101

* fix subgroup by None assignee FED-1100

* fix grouping by asignee or labels FED-1096

* fix create view popup FED-1093

* fix subgroup exception in swimlanes

* fix show sub issue filter FED-1102

* use Enums instead of numbers

* fix Estimates setting permission for admin

* disable access to project settings for viewers and guests

* fix project unautorized flicker

* add observer to estimates

* add permissions to member list
This commit is contained in:
rahulramesha 2023-12-04 20:03:23 +05:30 committed by sriram veeraghanta
parent c346d82b0b
commit a36aa4d093
24 changed files with 115 additions and 61 deletions

View file

@ -11,6 +11,7 @@ import { ArchiveX } from "lucide-react";
import { IProject } from "types";
// fetch keys
import { PROJECT_AUTOMATION_MONTHS } from "constants/project";
import { EUserWorkspaceRoles } from "constants/workspace";
type Props = {
handleChange: (formData: Partial<IProject>) => Promise<void>;
@ -53,6 +54,8 @@ export const AutoCloseAutomation: React.FC<Props> = observer((props) => {
default_state: defaultState,
};
const isAdmin = userRole === EUserWorkspaceRoles.ADMIN;
return (
<>
<SelectMonthModal
@ -83,7 +86,7 @@ export const AutoCloseAutomation: React.FC<Props> = observer((props) => {
: handleChange({ close_in: 0, default_state: null })
}
size="sm"
disabled={userRole !== 20}
disabled={!isAdmin}
/>
</div>
@ -102,7 +105,7 @@ export const AutoCloseAutomation: React.FC<Props> = observer((props) => {
}}
input
width="w-full"
disabled={userRole !== 20}
disabled={!isAdmin}
>
<>
{PROJECT_AUTOMATION_MONTHS.map((month) => (