Skip to content

Commit b0bca9d

Browse files
committed
fix: correct permissions project actions
1 parent df1c820 commit b0bca9d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/features/ProjectStats/ProjectActions/ProjectActions.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface ProjectActionsProps {
2222
export const ProjectActions = ({
2323
projectId,
2424
isCreator,
25-
isAdministrator,
25+
isAdministrator: isProjectAdministrator,
2626
isEditor,
2727
}: ProjectActionsProps) => {
2828
const { data: project, isLoading } = useGetProject(projectId);
@@ -34,7 +34,7 @@ export const ProjectActions = ({
3434
return project ? (
3535
<Box sx={{ display: "flex" }}>
3636
<OpenProjectButton projectId={projectId} />
37-
{!!(isEditor || isAdministrator) && (
37+
{!!(isEditor || isProjectAdministrator) && (
3838
<EditProjectButton projectId={project.project_id}>
3939
{({ openDialog }) => {
4040
return (
@@ -50,7 +50,9 @@ export const ProjectActions = ({
5050
</EditProjectButton>
5151
)}
5252
{!!isCreator && <DeleteProjectButton project={project} />}
53-
{!!(isEditor || isAdministrator) && <ChargesLinkIconButton productId={project.product_id} />}
53+
{!!(isEditor || isProjectAdministrator) && (
54+
<ChargesLinkIconButton productId={project.product_id} />
55+
)}
5456
</Box>
5557
) : null;
5658
};

0 commit comments

Comments
 (0)