Search in sources :

Example 16 with HomeDirectory

use of org.dcache.auth.attributes.HomeDirectory in project dcache by dCache.

the class OmniSessionPluginTest method shouldSuppressExistingAttributes.

@Test
public void shouldSuppressExistingAttributes() throws Exception {
    given(aPlugin().thatReturns(new RootDirectory("/"), new HomeDirectory("/home")));
    whenCalledWith(aSetOfPrincipals().withUsername("paul"), new RootDirectory("/root-dir"));
    assertThat(attributes, containsInAnyOrder(new RootDirectory("/root-dir"), new HomeDirectory("/home")));
}
Also used : HomeDirectory(org.dcache.auth.attributes.HomeDirectory) RootDirectory(org.dcache.auth.attributes.RootDirectory) Test(org.junit.Test)

Aggregations

HomeDirectory (org.dcache.auth.attributes.HomeDirectory)16 RootDirectory (org.dcache.auth.attributes.RootDirectory)14 LoginAttribute (org.dcache.auth.attributes.LoginAttribute)7 Principal (java.security.Principal)5 MaxUploadSize (org.dcache.auth.attributes.MaxUploadSize)5 FsPath (diskCacheV111.util.FsPath)4 Subject (javax.security.auth.Subject)4 GidPrincipal (org.dcache.auth.GidPrincipal)4 UidPrincipal (org.dcache.auth.UidPrincipal)4 UserNamePrincipal (org.dcache.auth.UserNamePrincipal)4 HashSet (java.util.HashSet)3 GroupNamePrincipal (org.dcache.auth.GroupNamePrincipal)3 ArrayList (java.util.ArrayList)2 NamingException (javax.naming.NamingException)2 Attributes (javax.naming.directory.Attributes)2 BasicAttributes (javax.naming.directory.BasicAttributes)2 PrefixRestriction (org.dcache.auth.attributes.PrefixRestriction)2 AuthenticationException (org.dcache.gplazma.AuthenticationException)2 MacaroonContext (org.dcache.macaroons.MacaroonContext)2 Test (org.junit.Test)2