diff options
author | Louis <6653109+artonge@users.noreply.github.com> | 2023-03-27 13:25:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 13:25:55 +0200 |
commit | fa39bce6dfecd33f689567abc62349260c46d413 (patch) | |
tree | 1472e8237822c8018978502b26fac147af4e23a7 /src | |
parent | a8173dd919fb81b3cdbce15fb3a03f67d39791e6 (diff) | |
parent | 18916b589f974b917ff5f940578fcdda31d7b4b4 (diff) |
Merge pull request #3281 from nextcloud/artonge/fix/setting_for_admins
Allow admin to manage circle settings
Diffstat (limited to 'src')
-rw-r--r-- | src/components/CircleDetails.vue | 2 | ||||
-rw-r--r-- | src/models/circle.d.ts | 4 | ||||
-rw-r--r-- | src/models/circle.ts | 8 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/components/CircleDetails.vue b/src/components/CircleDetails.vue index 4d919d53..90078a77 100644 --- a/src/components/CircleDetails.vue +++ b/src/components/CircleDetails.vue @@ -88,7 +88,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> diff --git a/src/models/circle.d.ts b/src/models/circle.d.ts index 71ba81de..d5f8248e 100644 --- a/src/models/circle.d.ts +++ b/src/models/circle.d.ts @@ -131,6 +131,10 @@ export default class Circle { */ get isOwner(): boolean; /** + * Is the initiator an admin of this circle? + */ + get isAdmin(): boolean; + /** * Is the initiator a member of this circle? */ get isMember(): boolean | 0 | undefined; diff --git a/src/models/circle.ts b/src/models/circle.ts index d7f4c144..4b71f960 100644 --- a/src/models/circle.ts +++ b/src/models/circle.ts @@ -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? */ |