Skip to content

Commit

Permalink
only project manager can add org
Browse files Browse the repository at this point in the history
  • Loading branch information
SeongHo Park committed Jul 5, 2024
1 parent e740a5c commit c353fc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
$: user = data.user;
let projectStore = data.project;
$: project = $projectStore;
$: orgList = data.myOrgs;
$: changesetStore = data.changesets;
let isEmpty: boolean = false;
$: isEmpty = project?.lastCommit == null;
Expand Down Expand Up @@ -348,7 +349,9 @@
organizations={project.organizations}
>
<svelte:fragment slot="extraButtons">
<AddOrganization orgList={data.myOrgs} projectId={project.id} />
{#if canManage}
<AddOrganization {orgList} projectId={project.id} />
{/if}
</svelte:fragment>
</OrgList>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export async function load(event: PageLoadEvent) {
}

event.depends(`project:${projectCode}`);

let orgs;
if (userIsAdmin) {
const orgsPromise = await client.query(graphql(`
Expand Down

0 comments on commit c353fc2

Please sign in to comment.