docs: public void grant(String principalId, String path, String... privileges) throws RepositoryException {
  
          final Session session = this.getAdminSession();
          final AccessControlManager acm = session.getAccessControlManager();
  
          final Privilege[] privilegeArray = this.toPrivilegeArray(session, privileges);
          final AccessControlList acl = this.getAccessControlList(session, path);
          final Principal principal = this.resolvePrincipal(principalId);
          // add a new one for the special "everyone" principal
          acl.addAccessControlEntry(principal, privilegeArray);
  
          // the policy must be re-set
          acm.setPolicy(path, acl);
  
          // and the session must be saved for the changes to be applied
          session.save();
  
      }