Examples of checkAccess()


Examples of org.apache.hadoop.yarn.server.timeline.security.TimelineACLsManager.checkAccess()

        "Other shouldn't be allowed to access",
        timelineACLsManager.checkAccess(
            UserGroupInformation.createRemoteUser("other"), entity));
    Assert.assertTrue(
        "Admin should be allowed to access",
        timelineACLsManager.checkAccess(
            UserGroupInformation.createRemoteUser("admin"), entity));
  }

  @Test
  public void testCorruptedOwnerInfo() throws Exception {
View Full Code Here

Examples of org.apache.hadoop.yarn.server.timeline.security.TimelineACLsManager.checkAccess()

    conf.set(YarnConfiguration.YARN_ADMIN_ACL, "owner");
    TimelineACLsManager timelineACLsManager =
        new TimelineACLsManager(conf);
    TimelineEntity entity = new TimelineEntity();
    try {
      timelineACLsManager.checkAccess(
          UserGroupInformation.createRemoteUser("owner"), entity);
      Assert.fail("Exception is expected");
    } catch (YarnException e) {
      Assert.assertTrue("It's not the exact expected exception", e.getMessage()
          .contains("is corrupted."));
View Full Code Here

Examples of org.apache.jetspeed.om.folder.DocumentSet.checkAccess()

        }

        // check access
        if (checkAccess)
        {
            documentSet.checkAccess(SecuredResource.VIEW_ACTION);
        }
        return documentSet;
    }

    /*
 
View Full Code Here

Examples of org.apache.jetspeed.om.folder.Folder.checkAccess()

            {
                throw new FolderNotFoundException("Folder " + folderPath + " not found.");
            }

            // check for view access on folder
            folder.checkAccess(JetspeedActions.VIEW);

            return folder;
        }
        catch (FolderNotFoundException fnfe)
        {
View Full Code Here

Examples of org.apache.jetspeed.om.folder.Folder.checkAccess()

            Folder pageFolder = (Folder)pageOrTemplates.getParent();
            Folder documentOrderingFolder = (Folder)pageFolder.getParent();
            if (documentOrderingFolder != null)
            {
                // check for edit permission
                documentOrderingFolder.checkAccess(JetspeedActions.EDIT);

                // shift document order and update document ordering in page manager
                boolean update = shiftDocumentOrder(documentOrderingFolder, pageFolder.getName(), null, true);
                if (update)
                {
View Full Code Here

Examples of org.apache.jetspeed.om.folder.Folder.checkAccess()

            ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
            BaseFragmentsElement pageOrTemplate = getPageOrTemplate(contentPageImpl.getPageOrTemplate().getPath());
            Folder documentOrderingFolder = (Folder)pageOrTemplate.getParent();

            // check for edit permission
            documentOrderingFolder.checkAccess(JetspeedActions.EDIT);

            // shift document order and update document ordering in page manager
            boolean update = shiftDocumentOrder(documentOrderingFolder, pageOrTemplate.getName(), pageOrTemplate.getType(), true);
            if (update)
            {
View Full Code Here

Examples of org.apache.jetspeed.om.folder.Folder.checkAccess()

            Folder pageFolder = (Folder)pageOrTemplate.getParent();
            Folder documentOrderingFolder = (Folder)pageFolder.getParent();
            if (documentOrderingFolder != null)
            {
                // check for edit permission
                documentOrderingFolder.checkAccess(JetspeedActions.EDIT);

                // shift document order and update document ordering in page manager
                boolean update = shiftDocumentOrder(documentOrderingFolder, pageFolder.getName(), null, false);
                if (update)
                {
View Full Code Here

Examples of org.apache.jetspeed.om.folder.Folder.checkAccess()

            ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
            BaseFragmentsElement pageOrTemplate = getPageOrTemplate(contentPageImpl.getPageOrTemplate().getPath());
            Folder documentOrderingFolder = (Folder)pageOrTemplate.getParent();

            // check for edit permission
            documentOrderingFolder.checkAccess(JetspeedActions.EDIT);

            // shift document order and update document ordering in page manager
            boolean update = shiftDocumentOrder(documentOrderingFolder, pageOrTemplate.getName(), pageOrTemplate.getType(), false);
            if (update)
            {
View Full Code Here

Examples of org.apache.jetspeed.om.folder.Folder.checkAccess()

            BaseFragmentsElement pageOrTemplate = getPageOrTemplate(contentPageImpl.getPageOrTemplate().getPath());
            BasePageElement page = ((pageOrTemplate instanceof BasePageElement) ? (BasePageElement)pageOrTemplate : null);
            Folder folder = (Folder)pageOrTemplate.getParent();
           
            // check for edit permission
            folder.checkAccess(JetspeedActions.EDIT);

            // construct new sibling folder
            String newFolderPath = folder.getPath()+(folder.getPath().endsWith(Folder.PATH_SEPARATOR) ? "" : Folder.PATH_SEPARATOR)+folderName;
            if (pageManager.folderExists(newFolderPath))
            {
View Full Code Here

Examples of org.apache.jetspeed.om.folder.Folder.checkAccess()

            BaseFragmentsElement pageOrTemplate = getPageOrTemplate(contentPageImpl.getPageOrTemplate().getPath());
            BasePageElement page = ((pageOrTemplate instanceof BasePageElement) ? (BasePageElement)pageOrTemplate : null);
            Folder folder = (Folder)pageOrTemplate.getParent();

            // check for edit permission
            folder.checkAccess(JetspeedActions.EDIT);

            // construct new sibling page
            String newPagePath = folder.getPath()+(folder.getPath().endsWith(Folder.PATH_SEPARATOR) ? "" : Folder.PATH_SEPARATOR)+pageName+Page.DOCUMENT_TYPE;
            if (pageManager.pageExists(newPagePath))
            {
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.