Map: diosplay of layers in the tree with viewableRole

This commit is contained in:
phil 2024-03-20 12:54:07 +05:30
parent 21f6e27c7f
commit 10904248ed

View file

@ -130,7 +130,7 @@ export class AuthenticationService {
if (roles.length == 0) return of(true)
// return this.roles.filter(value => -1 !== roles.indexOf(value.name)).length > 0
return this.configService.conf.pipe(map(
conf => conf.bsData?.user.roles.filter(value => -1 !== roles.indexOf(value.name)).length > 0
conf => conf.bsData?.user?.roles?.filter(value => -1 !== roles.indexOf(value.name)).length > 0
))
}
}