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:
parent
c346d82b0b
commit
a36aa4d093
24 changed files with 115 additions and 61 deletions
|
|
@ -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) => (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue