code: public Set<Permission> authorize(AuthenticatedUser user, IResource resource) {
      	String uname, rname;
      	access.log(Level.DEBUG,"Authorizing",uname=user.getName(),"for",rname=resource.getName());
  
      	Set<Permission> permissions;
  
      	if(user instanceof AAFAuthenticatedUser) {
  	        AAFAuthenticatedUser aafUser = (AAFAuthenticatedUser) user;
  			aafUser.setAnonymous(false);
  			
  			if(aafUser.isLocal()) {
  				permissions = checkPermissions(aafUser, new LocalPermission(
  					rname.replaceFirst("data", cluster_name)
  				));
  			} else {
  		   		permissions = checkPermissions(
  		   				aafUser,
  		   				perm_type,
  		   				':'+rname.replaceFirst("data", cluster_name).replace('/', ':'));
  			}
      	} else {
      		permissions = Permission.NONE;
      	}
      	
      	access.log(Level.INFO,"Permissions on",rname,"for",uname,':', permissions);
  
          return permissions;
      }
docs: Returns every permission on the resource granted to the user.