feat(rbac): resolved viewer permission in list

This commit is contained in:
Akhil Mohan
2023-09-08 21:22:36 +05:30
parent 4ca95f4d79
commit 252042fb20
4 changed files with 5 additions and 5 deletions
@@ -102,7 +102,7 @@ export const ProjectRoleList = ({ isRolesLoading, roles = [], onSelectRole }: Pr
{isRolesLoading && <TableSkeleton columns={4} innerKey="org-roles" />}
{roles?.map((role) => {
const { _id: id, name, createdAt, slug } = role;
const isNonMutatable = ["owner", "admin", "member"].includes(slug);
const isNonMutatable = ["admin", "member", "viewer"].includes(slug);
return (
<Tr key={`role-list-${id}`}>
@@ -108,7 +108,7 @@ type Props = {
export const ProjectRoleModifySection = ({ role, onGoBack }: Props) => {
const [searchPermission, setSearchPermission] = useState("");
const isNonEditable = ["owner", "admin", "member"].includes(role?.slug || "");
const isNonEditable = ["admin", "member", "viewer"].includes(role?.slug || "");
const isNewRole = !role?.slug;
const { createNotification } = useNotificationContext();