Merge branch 'fix-accessing-group-profile-when-not-member' into 'master'
Fix accessing group profile when not member See merge request framasoft/mobilizon!862
This commit is contained in:
commit
67ced567b1
@ -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