Examples of CategoryPathType


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

            try {
                Identity.instance().checkPermission( 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

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

            try {
                Identity.instance().checkPermission( 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

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

                try {
                    Identity.instance().checkPermission( 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

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

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

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

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

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

    void checkCategoryPermission(String cat) {
        if (Contexts.isSessionContextActive()) {
            Identity.instance().checkPermission(new CategoryPathType(cat),
                    RoleType.ANALYST_READ.getName());
        }
    }
View Full Code Here

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

      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

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

    // for GWT hosted mode - debug only
    if (!Contexts.isSessionContextActive()) {
      return true;
    } else {
      System.out.println("Checking access for : "  + makePath(parentPath, child));
      return Identity.instance().hasPermission(new CategoryPathType(makePath(parentPath, child)), "navigate");
    }
  }
View Full Code Here

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

        // 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

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

        if ( Contexts.isSessionContextActive() ) {
            Identity.instance().checkPermission( new PackageNameType( asset.metaData.packageName ),
                                                 RoleTypes.PACKAGE_READONLY );

            if ( asset.metaData.categories.length == 0 ) {
                Identity.instance().checkPermission( new CategoryPathType( null ),
                                                     RoleTypes.ANALYST_READ );
            } else {
                boolean passed = false;
                RuntimeException exception = null;

                for ( String cat : asset.metaData.categories ) {
                    // Check if user has a permission to read this asset.
                    try {
                        Identity.instance().checkPermission( new CategoryPathType( cat ),
                                                             RoleTypes.ANALYST_READ );
                        passed = true;
                    } catch ( RuntimeException e ) {
                        exception = e;
                    }
View Full Code Here

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

        if ( Contexts.isSessionContextActive() ) {
            Identity.instance().checkPermission( new PackageNameType( asset.metaData.packageName ),
                                                 RoleTypes.PACKAGE_DEVELOPER );

            if ( asset.metaData.categories.length == 0 ) {
                Identity.instance().checkPermission( new CategoryPathType( null ),
                                                     RoleTypes.ANALYST );
            } else {
                boolean passed = false;
                RuntimeException exception = null;

                for ( String cat : asset.metaData.categories ) {
                    try {
                        Identity.instance().checkPermission( new CategoryPathType( cat ),
                                                             RoleTypes.ANALYST );
                        passed = true;
                    } catch ( RuntimeException e ) {
                        exception = e;
                    }
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.