/** * @param granteeURI * @return the permissions assigned to a group grantee. */ public Collection<String> getPermissions(URI granteeURI) { return getPermissions(granteeURI.toASCIIString()); }
/** * @param granteeId * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(String granteeId, String permission) { return getPermissions(granteeId).contains(permission); }
/** * @param granteeURI * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(URI granteeURI, String permission) { return getPermissions(granteeURI).contains(permission); }
/** * @param granteeURI * @return the permissions assigned to a group grantee. */ public Collection<String> getPermissions(URI granteeURI) { return getPermissions(granteeURI.toASCIIString()); }
/** * @param granteeId * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(String granteeId, String permission) { return getPermissions(granteeId).contains(permission); }
/** * @param granteeURI * @return the permissions assigned to a group grantee. */ public Collection<String> getPermissions(URI granteeURI) { return getPermissions(granteeURI.toASCIIString()); }
/** * @param granteeId * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(String granteeId, String permission) { return getPermissions(granteeId).contains(permission); }
/** * @param granteeURI * @return the permissions assigned to a group grantee. */ public Collection<String> getPermissions(URI granteeURI) { return getPermissions(granteeURI.toASCIIString()); }
/** * @param granteeURI * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(URI granteeURI, String permission) { return getPermissions(granteeURI).contains(permission); }
/** * @param granteeURI * @return the permissions assigned to a group grantee. */ public Collection<String> getPermissions(URI granteeURI) { return getPermissions(granteeURI.toASCIIString()); }
/** * @param granteeURI * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(URI granteeURI, String permission) { return getPermissions(granteeURI).contains(permission); }
/** * @param granteeURI * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(URI granteeURI, String permission) { return getPermissions(granteeURI).contains(permission); }
/** * @param granteeId * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(String granteeId, String permission) { return getPermissions(granteeId).contains(permission); }
/** * @param granteeId * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(String granteeId, String permission) { return getPermissions(granteeId).contains(permission); }
/** * @param grantee * @return the permissions assigned to a grantee. */ public Collection<String> getPermissions(Grantee grantee) { return getPermissions(grantee.getIdentifier()); }
/** * @param grantee * @return the permissions assigned to a grantee. */ public Collection<String> getPermissions(Grantee grantee) { return getPermissions(grantee.getIdentifier()); }
/** * @param grantee * @return the permissions assigned to a grantee. */ public Collection<String> getPermissions(Grantee grantee) { return getPermissions(grantee.getIdentifier()); }
/** * @param grantee * @return the permissions assigned to a grantee. */ public Collection<String> getPermissions(Grantee grantee) { return getPermissions(grantee.getIdentifier()); }
/** * @param grantee * @return the permissions assigned to a grantee. */ public Collection<String> getPermissions(Grantee grantee) { return getPermissions(grantee.getIdentifier()); }
@Test public void testAccessControlListOwnerOnly() throws HttpException { String ownerId = "1a405254c932b52e5b5caaa88186bc431a1bacb9ece631f835daddaf0c47677c"; AccessControlList acl = createParser().parse(Strings2.toInputStream(aclOwnerOnly)); assertEquals(acl.getOwner().getId(), ownerId); assertEquals(acl.getOwner().getDisplayName(), "jamesmurty"); assertEquals(acl.getPermissions(ownerId).size(), 1); assertTrue(acl.hasPermission(ownerId, Permission.FULL_CONTROL)); assertEquals(acl.getGrants().size(), 1); assertEquals(acl.getPermissions(GroupGranteeURI.ALL_USERS).size(), 0); assertEquals(acl.getPermissions(GroupGranteeURI.AUTHENTICATED_USERS).size(), 0); assertEquals(acl.getPermissions(GroupGranteeURI.LOG_DELIVERY).size(), 0); }