Examples of ReplicationRequestAuthorizationException


Examples of org.apache.sling.replication.agent.ReplicationRequestAuthorizationException

               checkPermissionForDelete(session, replicationRequest.getPaths());
           }

        }
        catch (RepositoryException e) {
            throw new ReplicationRequestAuthorizationException("Not enough privileges");
        }

    }
View Full Code Here

Examples of org.apache.sling.replication.agent.ReplicationRequestAuthorizationException

        AccessControlManager acMgr = session.getAccessControlManager();

        Privilege[] privileges = new Privilege[] { acMgr.privilegeFromName(jcrPrivilege), acMgr.privilegeFromName(Privilege.JCR_READ) };
        for (String path : paths) {
            if(!acMgr.hasPrivileges(path, privileges)) {
                throw new ReplicationRequestAuthorizationException("Not enough privileges");
            }
        }

    }
View Full Code Here

Examples of org.apache.sling.replication.agent.ReplicationRequestAuthorizationException

        AccessControlManager acMgr = session.getAccessControlManager();

        Privilege[] privileges = new Privilege[] { acMgr.privilegeFromName(jcrPrivilege), acMgr.privilegeFromName(Privilege.JCR_REMOVE_NODE)  };
        for (String path : paths) {
            if(session.nodeExists(path) && !acMgr.hasPrivileges(path, privileges)) {
                throw new ReplicationRequestAuthorizationException("Not enough privileges");
            }
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.