Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Genesys Backend Genesys Backend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Genesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #318
Closed
Open
Created Sep 07, 2018 by Matija Obreza@mobrezaOwner

Include inherited permissions

In Permissions API v1, add a static private class _AclObjectIdentity extending AclObjectIdentity with

public List<AclEntry> inherited;

In method lazyLoadForJson, return _AclObjectIdentity and fill the inherited list recursively with ACL entries for all parentObjects:

private void inhertied(AclObjectIdentity objectIdentity, List<AclEntry> aclEntries, Set<AclObjectIdentity> handled) {
  if (objectIdentity == null || handled.contains(objectIdentity)) {
    return aclEntries;
  }
  aclEntries.addAll(objectIdentity.getAclEntries());
  handled.add(objectIdentity);

  if (objectIdentity.getParentObject() != null) {
    inherited(objectIdentity.getParentObject(), aclEntries, handled);
  }
}

Also add objectIdentity.inherited.forEach(entry -> entry.getAclSid().getId());.

Edited Sep 07, 2018 by Matija Obreza
Assignee
Assign to
Time tracking