view user access for acl entities
This commit is contained in:
@@ -93,8 +93,11 @@ class UsersAccessService
|
||||
throw new Forbidden("No access for portal user.");
|
||||
}
|
||||
|
||||
if (!$this->metadata->get("scopes.{$entity->getEntityType()}.object")) {
|
||||
throw new Forbidden("Non-object entity.");
|
||||
if (
|
||||
!$this->metadata->get("scopes.{$entity->getEntityType()}.object") &&
|
||||
!$this->metadata->get("scopes.{$entity->getEntityType()}.acl")
|
||||
) {
|
||||
throw new Forbidden("Non-object entity and non-acl entity.");
|
||||
}
|
||||
|
||||
if (!$this->acl->checkEntityRead($entity)) {
|
||||
|
||||
@@ -41,7 +41,10 @@ export default class {
|
||||
const level = this.view.getAcl().getPermissionLevel('user');
|
||||
|
||||
this.toShow = (level === 'all' || level === 'team') &&
|
||||
this.metadata.get(`scopes.${this.entityType}.object`) &&
|
||||
(
|
||||
this.metadata.get(`scopes.${this.entityType}.object`) ||
|
||||
this.metadata.get(`scopes.${this.entityType}.acl`)
|
||||
)
|
||||
this.view.getAcl().checkScope('User');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user