Skip to content

Commit

Permalink
Allow admin to manage circle settings
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge authored and backportbot-nextcloud[bot] committed Mar 27, 2023
1 parent 1c7cb3c commit 8f5e20c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/CircleDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
@update:value="onDescriptionChangeDebounce" />
</section>

<section v-if="circle.isOwner && !circle.isPersonal" class="circle-details-section">
<section v-if="(circle.isOwner || circle.isAdmin) && !circle.isPersonal" class="circle-details-section">
<CircleConfigs class="circle-details-section__configs" :circle="circle" />
<CirclePasswordSettings class="circle-details-section__configs" :circle="circle" />
</section>
Expand Down
4 changes: 4 additions & 0 deletions src/models/circle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ export default class Circle {
* Can the initiator add members to this circle?
*/
get isOwner(): boolean;
/**
* Is the initiator an admin of this circle?
*/
get isAdmin(): boolean;
/**
* Is the initiator a member of this circle?
*/
Expand Down
8 changes: 8 additions & 0 deletions src/models/circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,14 @@ export default class Circle {
return this.initiator?.level === MemberLevels.OWNER
}

// PERMISSIONS SHORTCUTS ------------------------------
/**
* Is the initiator an admin of this circle?
*/
get isAdmin() {
return this.initiator?.level === MemberLevels.ADMIN
}

/**
* Is the initiator a member of this circle?
*/
Expand Down

0 comments on commit 8f5e20c

Please sign in to comment.