Package org.apache.sling.replication.agent

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


        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

        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

Related Classes of org.apache.sling.replication.agent.ReplicationRequestAuthorizationException

Copyright © 2018 www.massapicom. 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.