Examples of Permissions


Examples of java.security.Permissions

        // Section 3.3 - Check permissions
        checkSetPolicy();

        // all policy statements are deleted
        excludedPermissions = new Permissions();
        uncheckedPermissions = new Permissions();
        rolePermissions = new HashMap<String, PermissionCollection>();

        // change state to DELETED
        state = State.DELETED;
View Full Code Here

Examples of java.security.Permissions

        // Open state required
        checkCurrentStateIsInState(State.OPEN);

        // reinit
        excludedPermissions = new Permissions();
    }
View Full Code Here

Examples of java.security.Permissions

     * @return the excluded permission
     */
    public PermissionCollection getExcludedPermissions() {
        // Works only if state is in service
        if (state != State.IN_SERVICE) {
            return new Permissions();
        }
        return excludedPermissions;
    }
View Full Code Here

Examples of java.security.Permissions

     * @return the excluded permission
     */
    public PermissionCollection getUncheckedPermissions() {
        // Works only if state is in service
        if (state != State.IN_SERVICE) {
            return new Permissions();
        }
        return uncheckedPermissions;
    }
View Full Code Here

Examples of java.security.Permissions

        logger.debug("principal = ''{0}''", principal);

        // Works only if state is in service and if principal is not null
        if (principal == null || state != State.IN_SERVICE) {
            return new Permissions();
        }

        PermissionCollection permissionsOfRole = rolePermissions.get(principal.getName());

        logger.debug("Permissions found = ''{0}''", permissionsOfRole);

        // create empty permission object if no previous permission for the
        // given role
        if (permissionsOfRole == null) {
            permissionsOfRole = new Permissions();
        }

        return permissionsOfRole;
    }
View Full Code Here

Examples of java.security.Permissions

         addToExcludedPolicy(en.nextElement());
   }

   public void addToRole(String roleName, Permission permission) throws PolicyContextException
   {
      Permissions p = rolePerms.get(roleName);
      if(p == null)
         p = new Permissions();
      p.add(permission);
      rolePerms.put(roleName, p);
   }
View Full Code Here

Examples of java.security.Permissions

      this.excludedPolicy = null;
   }

   public void removeRole(String roleName) throws PolicyContextException
   {
      Permissions p = this.rolePerms.get(roleName);
      if(p != null)
      {
         p = null;
         rolePerms.remove(roleName);
      }  
View Full Code Here

Examples of java.security.Permissions

      }
      else
     
         try
         {
            Permissions perms = this.getPermissionsForRole("*");
            if(perms != null)
               implied = perms.implies(new WebResourcePermission("/*",(String)null));
         }
         catch (PolicyContextException e)
         {
            throw new RuntimeException(e);
        
View Full Code Here

Examples of java.security.Permissions

            if (parentLayer == null)
            {
                return super.getPermissions(cs);
            }

            Permissions combi = new Permissions();
            PermissionCollection permCollect = super.getPermissions(cs);
            copyPermissions(permCollect, combi);

            for (FileObject parent = parentLayer;
                 parent != null;
View Full Code Here

Examples of java.security.Permissions

 
  public void addPermission(Permission perm)
  {
    if (_permissions == null) {
      _permissions = new Permissions();
    }
    _permissions.add(perm);
  }
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.