feat: even project manager should not edit/delete project (#14)
* fix: remove unused import * feat: even project manager should not edit/delete project * docs: even project manager should not edit/delete project
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { title, subtitle } from '@/components/primitives';
|
||||
import { Card, CardHeader, CardBody, Avatar } from '@nextui-org/react';
|
||||
import { Scale, Folder, Check, Globe } from 'lucide-react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Image, Divider } from '@nextui-org/react';
|
||||
import { Divider } from '@nextui-org/react';
|
||||
import { title, subtitle } from '@/components/primitives';
|
||||
import PaneMainTitle from './PaneMainTitle';
|
||||
import PaneMainFeatures from './PaneMainFeatures';
|
||||
|
||||
@@ -92,7 +92,7 @@ export default function SettingsPage({ projectId, messages, locale }: Props) {
|
||||
startContent={<Trash size={16} />}
|
||||
size="sm"
|
||||
color="danger"
|
||||
isDisabled={!context.isProjectManager(Number(projectId))}
|
||||
isDisabled={!context.isProjectOwner(Number(projectId))}
|
||||
onClick={() => setIsDeleteConfirmDialogOpen(true)}
|
||||
>
|
||||
{messages.deleteProject}
|
||||
@@ -101,7 +101,7 @@ export default function SettingsPage({ projectId, messages, locale }: Props) {
|
||||
startContent={<Pencil size={16} />}
|
||||
size="sm"
|
||||
color="primary"
|
||||
isDisabled={!context.isProjectManager(Number(projectId))}
|
||||
isDisabled={!context.isProjectOwner(Number(projectId))}
|
||||
onClick={() => setIsProjectDialogOpen(true)}
|
||||
className="ms-2"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user