Package com.adito.policyframework

Examples of com.adito.policyframework.ResourceItem


        }
    return false;
  }

  public String getPath(AvailableTableItemAction availableItem) {
    ResourceItem item = (ResourceItem) availableItem
        .getRowItem();
    PropertyProfile p = (PropertyProfile)item.getResource();
    return p.getOwnerUsername() != null || ( p.getOwnerUsername() == null && availableItem.getSessionInfo().getNavigationContext() == SessionInfo.USER_CONSOLE_CONTEXT) ? "/showUserProperties.do?selectedPropertyProfile=" + item.getResource().getResourceId() :
      "/showGlobalProperties.do?selectedPropertyProfile=" + item.getResource().getResourceId();
  }
View Full Code Here


        super(navigationContext, messageResourcesKey);
    }

    public boolean isEnabled(AvailableTableItemAction availableItem) {
        try {
            ResourceItem item = (ResourceItem) availableItem.getRowItem();
            try {
                if (((AuthenticationScheme) item.getResource()).isSystemScheme()){
                    // it is System Authentication Scheme so cannot be deleted.
                    return false;
                }
            } catch (Exception e) {
                // there has been an error so do not display
                return false;
            }
           
            Permission[] permissions = new Permission[] { PolicyConstants.PERM_DELETE };
            ResourceUtil.checkResourceManagementRights(item.getResource(), availableItem.getSessionInfo(), permissions);
            return true;
        } catch (NoPermissionException e) {
            return false;
        }
    }
View Full Code Here

    return (ResourceItem)availableItem.getRowItem();
  }
 

  public boolean isEnabled(AvailableTableItemAction availableItem) {
    ResourceItem item = getResourceItem(availableItem);
    HttpServletRequest request = availableItem.getRequest();
    SessionInfo sessionInfo = LogonControllerFactory.getInstance().getSessionInfo(request);
    try {
        // this is an extra check to ensure that the webDav authentication scheme is accessible to allow web folders.
        AuthenticationScheme authenticationSchemeSequence = SystemDatabaseFactory.getInstance().getAuthenticationSchemeSequence("WebDAV", sessionInfo.getRealm().getRealmID());
        boolean principalAllowed = PolicyDatabaseFactory.getInstance().isPrincipalAllowed(sessionInfo.getUser(), authenticationSchemeSequence, true);
        if (principalAllowed){
              BrowserChecker checker = new BrowserChecker(request.getHeader("user-agent"));
              if (item.getResource().getResourceType().equals(
                      NetworkPlacePlugin.NETWORK_PLACE_RESOURCE_TYPE)
                      && CoreUtil
                              .isAuthenticationModuleInUse(WebDAVAuthenticationModule.MODULE_NAME)
                      && ( checker.isBrowserVersionExpression(BrowserChecker.BROWSER_IE, "+=5") ||
                          ( Property.getPropertyBoolean(
View Full Code Here

TOP

Related Classes of com.adito.policyframework.ResourceItem

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.