Skip to content

Commit 70d6d67

Browse files
committed
refactor: replace remaining references to project owners with project administrators
1 parent 7664203 commit 70d6d67

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

components/projects/EditProjectButton/EditProjectButton.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export const EditProjectButton = ({ project }: EditProjectButtonProps) => {
4646
{project.name}
4747
</Typography>
4848

49-
<Typography gutterBottom>{/* <b>Owner</b>: {project.owner} */}</Typography>
50-
5149
<PrivateProjectToggle isPrivate={project.private} projectId={project.project_id} />
5250

5351
<Box display="flex" flexDirection="column" gap={2}>

features/ProjectTable/FileActions.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface FileActionsProps {
5050
*/
5151
export const FileActions = ({ file }: FileActionsProps) => {
5252
const project = useCurrentProject();
53-
const isProjectOwnerOrEditor = useIsUserAdminOrEditorOfCurrentProject();
53+
const isProjectAdminOrEditor = useIsUserAdminOrEditorOfCurrentProject();
5454

5555
const breadcrumbs = useProjectBreadcrumbs();
5656
const path = "/" + breadcrumbs.join("/");
@@ -76,7 +76,7 @@ export const FileActions = ({ file }: FileActionsProps) => {
7676
{/* Managed files are "detached" */}
7777
{isManagedFile && (
7878
<DetachDataset
79-
disabled={!isProjectOwnerOrEditor}
79+
disabled={!isProjectAdminOrEditor}
8080
fileId={fileId}
8181
path={path}
8282
projectId={project.project_id}
@@ -86,7 +86,7 @@ export const FileActions = ({ file }: FileActionsProps) => {
8686
{/* Unmanaged files are "deleted" */}
8787
{isFile && !isManagedFile && (
8888
<DeleteUnmanagedFileButton
89-
disabled={!isProjectOwnerOrEditor}
89+
disabled={!isProjectAdminOrEditor}
9090
fileName={file.fileName}
9191
path={path}
9292
projectId={project.project_id}
@@ -95,7 +95,7 @@ export const FileActions = ({ file }: FileActionsProps) => {
9595
{!isFile && (
9696
<DeleteDirectoryButton
9797
directoryName={file.fileName}
98-
disabled={!isProjectOwnerOrEditor}
98+
disabled={!isProjectAdminOrEditor}
9999
path={path}
100100
projectId={project.project_id}
101101
/>

features/ProjectTable/ProjectTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const ProjectTable = ({ currentProject, openUploadDialog }: ProjectTableP
4949

5050
const router = useRouter();
5151

52-
const isProjectOwnerOrEditor = useIsUserAdminOrEditorOfCurrentProject();
52+
const isProjectAdminOrEditor = useIsUserAdminOrEditorOfCurrentProject();
5353

5454
// Breadcrumbs
5555
const breadcrumbs = useProjectBreadcrumbs();
@@ -179,7 +179,7 @@ export const ProjectTable = ({ currentProject, openUploadDialog }: ProjectTableP
179179
<Grid item sx={{ marginLeft: "auto" }}>
180180
<Tooltip title="Upload unmanaged file">
181181
<IconButton
182-
disabled={!isProjectOwnerOrEditor}
182+
disabled={!isProjectAdminOrEditor}
183183
size="large"
184184
onClick={openUploadDialog}
185185
>

features/userSettings/UserSettingsContent/ContextSection/contextActions/CreateOrganisationListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { useKeycloakUser } from "../../../../../hooks/useKeycloakUser";
2121
import { useSelectedOrganisation } from "../../../../../state/organisationSelection";
2222

2323
/**
24-
* Button which allows organisation owner to create a new project.
24+
* Button which allows organisation owners to create a new project.
2525
*/
2626
export const CreateOrganisationListItem = () => {
2727
const [open, setOpen] = useState(false);

features/userSettings/UserSettingsContent/ContextSection/contextActions/CreateUnitListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { useSelectedUnit } from "../../../../../state/unitSelection";
2323
import { getBillingDay } from "../../../../../utils/app/products";
2424

2525
/**
26-
* Button which allows organisation owner to create a new project.
26+
* Button which allows organisation owners to create a new unit.
2727
*/
2828
export const CreateUnitListItem = () => {
2929
const [open, setOpen] = useState(false);

features/userSettings/UserSettingsContent/UserSettingsContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const UserSettingsContent = () => {
5555
});
5656

5757
// the user could land on a project via a URL parameter. If we don't sync this state, the selected
58-
// project could be filtered out if the current user is not the owner or editor
58+
// project could be filtered out if the current user is not an administrator or editor
5959
const fallBackToNone =
6060
project !== null &&
6161
!!user.username &&

0 commit comments

Comments
 (0)