Package org.drools.guvnor.server.security

Examples of org.drools.guvnor.server.security.CategoryPathType


        response.getOutputStream().print(feed.getAtom());
    }

    void checkCategoryPermission(String cat) {
        if ( Contexts.isSessionContextActive() ) {
            Identity.instance().checkPermissionnew CategoryPathType( cat ),
                                                 RoleTypes.ANALYST_READ );
        }
    }
View Full Code Here


      return false;
    // for GWT hosted mode - debug only
    if (!Contexts.isSessionContextActive()) {
      return true;
    } else {
      return Identity.instance().hasPermission(new CategoryPathType((String)artifact), action);
    }
  }
View Full Code Here

  public boolean acceptNavigate(String parentPath, String child) {
    // for GWT hosted mode - debug only
    if (!Contexts.isSessionContextActive()) {
      return true;
    } else {
      return Identity.instance().hasPermission(new CategoryPathType(makePath(parentPath, child)), "navigate");
    }
  }
View Full Code Here

        // love you
        // long time = System.currentTimeMillis();

        // First check the user has permission to access this categoryPath.
        if ( Contexts.isSessionContextActive() ) {
            if ( !Identity.instance().hasPermission( new CategoryPathType( categoryPath ),
                                                     RoleTypes.ANALYST_READ ) ) {

                TableDisplayHandler handler = new TableDisplayHandler( tableConfig );
                return handler.loadRuleListTable( new AssetPageList() );
            }
View Full Code Here

            new PackageNameType(asset.metaData.packageName),
            RoleTypes.PACKAGE_READONLY);
      } catch (RuntimeException e) {
        if (asset.metaData.categories.length == 0) {
          Identity.instance().checkPermission(
              new CategoryPathType(null), RoleTypes.ANALYST_READ);
        } else {
          RuntimeException exception = null;

          for (String cat : asset.metaData.categories) {
            try {
              Identity.instance().checkPermission(
                  new CategoryPathType(cat),
                  RoleTypes.ANALYST_READ);
              passed = true;
            } catch (RuntimeException re) {
              exception = re;
            }
View Full Code Here

            new PackageNameType(asset.metaData.packageName),
            RoleTypes.PACKAGE_DEVELOPER);
      } catch (RuntimeException e) {
        if (asset.metaData.categories.length == 0) {
          Identity.instance().checkPermission(
              new CategoryPathType(null), RoleTypes.ANALYST);
        } else {
          RuntimeException exception = null;

          for (String cat : asset.metaData.categories) {
            try {
              Identity.instance().checkPermission(
                  new CategoryPathType(cat),
                  RoleTypes.ANALYST);
              passed = true;
            } catch (RuntimeException re) {
              exception = re;
            }
View Full Code Here

                new PackageUUIDType(asset.getPackage().getUUID()),
                RoleTypes.PACKAGE_DEVELOPER);
          } catch (RuntimeException e) {
             if (asset.getCategories().size() == 0) {
              Identity.instance().checkPermission(
                  new CategoryPathType(null), RoleTypes.ANALYST);
            } else {
              RuntimeException exception = null;

              for (CategoryItem cat : asset.getCategories()) {
                try {
                  Identity.instance().checkPermission(
                      new CategoryPathType(cat.getName()),
                      RoleTypes.ANALYST);
                  passed = true;
                } catch (RuntimeException re) {
                  exception = re;
                }
View Full Code Here

        response.setContentType("application/atom+xml; charset=UTF-8");
        response.getWriter().print(feed.getAtom());
    }

    void checkCategoryPermission(String cat) {
        identity.checkPermission(new CategoryPathType(cat),
                RoleType.ANALYST_READ.getName());
    }
View Full Code Here

        // Role-based Authorization check: This method only returns rules that
        // the user has permission to access. The user is considered to has
        // permission to access the particular category when: The user has
        // ANALYST_READ role or higher (i.e., ANALYST) to this category
        if ( !serviceSecurity.isSecurityIsAnalystReadWithTargetObject( new CategoryPathType( request.getCategoryPath() ) ) ) {
            List<CategoryPageRow> rowList = new ArrayList<CategoryPageRow>();
            PageResponse<CategoryPageRow> pageResponse = new PageResponseBuilder<CategoryPageRow>()
                    .withStartRowIndex(request.getStartRowIndex())
                    .withPageRowList(rowList)
                    .withLastPage(true)
View Full Code Here

        }
        // for GWT hosted mode - debug only
        if ( !Contexts.isSessionContextActive() ) {
            return true;
        }
        return Identity.instance().hasPermission( new CategoryPathType( (String) artifact ), action );

    }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.server.security.CategoryPathType

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.