Allow members-restricted posts to be viewable by instance moderators

But add a warning message on top of the post

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-08-05 11:01:40 +02:00
parent c4bd26c120
commit f3a05929d9
9 changed files with 62 additions and 32 deletions

View File

@@ -84,6 +84,14 @@ export default class GroupMixin extends Vue {
]);
}
get isCurrentActorAGroupMember(): boolean {
return this.hasCurrentActorThisRole([
MemberRole.MODERATOR,
MemberRole.ADMINISTRATOR,
MemberRole.MEMBER,
]);
}
hasCurrentActorThisRole(givenRole: string | string[]): boolean {
const roles = Array.isArray(givenRole) ? givenRole : [givenRole];
return (