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
|
|
@ -1,15 +1,27 @@
|
|||
import { FC, ReactNode } from "react";
|
||||
// components
|
||||
import { ProjectSettingsSidebar } from "./sidebar";
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
import { EUserWorkspaceRoles } from "constants/workspace";
|
||||
import { NotAuthorizedView } from "components/auth-screens";
|
||||
import { observer } from "mobx-react-lite";
|
||||
|
||||
export interface IProjectSettingLayout {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export const ProjectSettingLayout: FC<IProjectSettingLayout> = (props) => {
|
||||
export const ProjectSettingLayout: FC<IProjectSettingLayout> = observer((props) => {
|
||||
const { children } = props;
|
||||
|
||||
return (
|
||||
const {
|
||||
user: { currentProjectRole },
|
||||
} = useMobxStore();
|
||||
|
||||
const restrictViewSettings = currentProjectRole && currentProjectRole <= EUserWorkspaceRoles.VIEWER;
|
||||
|
||||
return restrictViewSettings ? (
|
||||
<NotAuthorizedView type="project" />
|
||||
) : (
|
||||
<div className="flex gap-2 h-full w-full overflow-x-hidden overflow-y-scroll">
|
||||
<div className="w-80 pt-8 overflow-y-hidden flex-shrink-0">
|
||||
<ProjectSettingsSidebar />
|
||||
|
|
@ -17,4 +29,4 @@ export const ProjectSettingLayout: FC<IProjectSettingLayout> = (props) => {
|
|||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue