Package org.exist.security

Examples of org.exist.security.Account


    {
      //main module, not a library module, so access to function is always allowed
      return null;
    }
   
    final Account user = context.getUser();
    final Set<Subject> subjects = createQuerySubjects(user, contextModule);

    final Set<Attribute> resourceAttributes = new HashSet<Attribute>(8);
    addStringAttribute(resourceAttributes, XACMLConstants.MODULE_CATEGORY_ATTRIBUTE, getModuleCategory(functionModule));
    final XACMLSource moduleSrc = generateModuleSource(functionModule);
View Full Code Here


            /* update document */
           
            LOG.debug("Found old doc " + oldDoc.getDocId());
           
            // check if the document is locked by another user
            final Account lockUser = oldDoc.getUserLock();
            if(lockUser != null && !lockUser.equals(broker.getSubject())) {
                throw new PermissionDeniedException("The document is locked by user '" + lockUser.getName() + "'.");
            }
           
            // do we have write permission on the old document or are we the owner of the old document?
            if (!((oldDoc.getPermissions().getOwner().getId() == broker.getSubject().getId()) || (oldDoc.getPermissions().validate(broker.getSubject(), Permission.WRITE)))) {
                throw new PermissionDeniedException("A resource with the same name already exists in the target collection '" + path + "', and you do not have write access on that resource.");
View Full Code Here

TOP

Related Classes of org.exist.security.Account

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.