Fix accessing group profile when not member
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
27a1d92e52
commit
28bfc31b01
@ -84,7 +84,10 @@ export default class GroupMixin extends Vue {
|
|||||||
|
|
||||||
hasCurrentActorThisRole(givenRole: string | string[]): boolean {
|
hasCurrentActorThisRole(givenRole: string | string[]): boolean {
|
||||||
const roles = Array.isArray(givenRole) ? givenRole : [givenRole];
|
const roles = Array.isArray(givenRole) ? givenRole : [givenRole];
|
||||||
return roles.includes(this.person?.memberships?.elements[0].role);
|
return (
|
||||||
|
this.person?.memberships?.total > 0 &&
|
||||||
|
roles.includes(this.person?.memberships?.elements[0].role)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleErrors(errors: any[]): void {
|
handleErrors(errors: any[]): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user