Examples of addToRole()


Examples of javax.security.jacc.PolicyConfiguration.addToRole()

            policy.addToExcludedPolicy(policyContext.getExcludedPermissions());

            policy.addToUncheckedPolicy(policyContext.getUncheckedPermissions());

            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

            policy.addToExcludedPolicy(policyContext.getExcludedPermissions());

            policy.addToUncheckedPolicy(policyContext.getUncheckedPermissions());

            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

            policy.addToExcludedPolicy(policyContext.getExcludedPermissions());

            policy.addToUncheckedPolicy(policyContext.getUncheckedPermissions());

            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

                Map.Entry roleEntry = (Map.Entry) roleIterator.next();
                String roleName = (String) roleEntry.getKey();
                PermissionCollection rolePermissions = (PermissionCollection) roleEntry.getValue();
                for (Enumeration permissions = rolePermissions.elements(); permissions.hasMoreElements();) {
                    Permission permission = (Permission) permissions.nextElement();
                    policyConfiguration.addToRole(roleName, permission);

                }
            }
        }
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

            for (Map.Entry<String, PermissionCollection> roleEntry : componentPermissions.getRolePermissions().entrySet()) {
                String roleName = roleEntry.getKey();
                PermissionCollection rolePermissions = roleEntry.getValue();
                for (Enumeration permissions = rolePermissions.elements(); permissions.hasMoreElements();) {
                    Permission permission = (Permission) permissions.nextElement();
                    policyConfiguration.addToRole(roleName, permission);

                }
            }
        }
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

            for (Map.Entry<String, PermissionCollection> roleEntry : componentPermissions.getRolePermissions().entrySet()) {
                String roleName = roleEntry.getKey();
                PermissionCollection rolePermissions = roleEntry.getValue();
                for (Enumeration<Permission> permissions = rolePermissions.elements(); permissions.hasMoreElements();) {
                    Permission permission = permissions.nextElement();
                    policyConfiguration.addToRole(roleName, permission);

                }
            }
        }
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

            for (Map.Entry<String, PermissionCollection> roleEntry : componentPermissions.getRolePermissions().entrySet()) {
                String roleName = roleEntry.getKey();
                PermissionCollection rolePermissions = roleEntry.getValue();
                for (Enumeration<Permission> permissions = rolePermissions.elements(); permissions.hasMoreElements();) {
                    Permission permission = permissions.nextElement();
                    policyConfiguration.addToRole(roleName, permission);
                }
            }
        }
        if (principalRoleMapper != null) {
            principalRoleMapper.install(contextIdToPermissionsMap.keySet());
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

                Map.Entry roleEntry = (Map.Entry) roleIterator.next();
                String roleName = (String) roleEntry.getKey();
                PermissionCollection rolePermissions = (PermissionCollection) roleEntry.getValue();
                for (Enumeration permissions = rolePermissions.elements(); permissions.hasMoreElements();) {
                    Permission permission = (Permission) permissions.nextElement();
                    policyConfiguration.addToRole(roleName, permission);

                }
            }

            GeronimoPolicyConfigurationFactory roleMapperFactory = GeronimoPolicyConfigurationFactory.getSingleton();
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

            policy.addToExcludedPolicy(policyContext.getExcludedPermissions());

            policy.addToUncheckedPolicy(policyContext.getUncheckedPermissions());

            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
View Full Code Here

Examples of javax.security.jacc.PolicyConfiguration.addToRole()

       * are loaded based on the role and a check is made.
       */
      PermissionCollection permColl = new LazyPermissionCollection();
      permColl.add(getPortalObjectPermission("/")); //Add all possible permissions
      permColl.add(new DummyPortalPermission("/default", "view")); //Add a dummy permission
      pc.addToRole("employee", permColl);
      pc.addToRole("admin", permColl);
      pc.addToRole("janitor", permColl);
      pc.commit();
     
      Policy policy = Policy.getPolicy();
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.