use of org.neo4j.kernel.impl.api.security.RestrictedAccessMode in project neo4j by neo4j.
the class EnterpriseSecurityContextDescriptionTest method shouldMakeNiceDescriptionAuthDisabledAndRestricted.
@Test
public void shouldMakeNiceDescriptionAuthDisabledAndRestricted() throws Throwable {
EnterpriseSecurityContext disabled = EnterpriseSecurityContext.AUTH_DISABLED;
EnterpriseSecurityContext restricted = disabled.withMode(new RestrictedAccessMode(disabled.mode(), AccessMode.Static.READ));
assertThat(restricted.description(), equalTo("AUTH_DISABLED with FULL restricted to READ"));
}
use of org.neo4j.kernel.impl.api.security.RestrictedAccessMode in project neo4j by neo4j.
the class EnterpriseSecurityContextDescriptionTest method shouldMakeNiceDescriptionRestricted.
@Test
public void shouldMakeNiceDescriptionRestricted() throws Throwable {
manager.newRole("role1", "mats");
manager.addRoleToUser(PUBLISHER, "mats");
EnterpriseSecurityContext restricted = context.withMode(new RestrictedAccessMode(context.mode(), AccessMode.Static.READ));
assertThat(restricted.description(), equalTo("user 'mats' with roles [publisher,role1] restricted to READ"));
}
use of org.neo4j.kernel.impl.api.security.RestrictedAccessMode in project neo4j by neo4j.
the class SecurityContextDescriptionTest method shouldMakeNiceDescriptionAuthDisabledAndRestricted.
@Test
public void shouldMakeNiceDescriptionAuthDisabledAndRestricted() throws Throwable {
SecurityContext disabled = SecurityContext.AUTH_DISABLED;
SecurityContext restricted = disabled.withMode(new RestrictedAccessMode(disabled.mode(), AccessMode.Static.READ));
assertThat(restricted.description(), equalTo("AUTH_DISABLED with FULL restricted to READ"));
}
use of org.neo4j.kernel.impl.api.security.RestrictedAccessMode in project neo4j by neo4j.
the class SecurityContextDescriptionTest method shouldMakeNiceDescriptionRestricted.
@Test
public void shouldMakeNiceDescriptionRestricted() throws Throwable {
SecurityContext restricted = context.withMode(new RestrictedAccessMode(context.mode(), AccessMode.Static.READ));
assertThat(restricted.description(), equalTo("user 'johan' with FULL restricted to READ"));
}
Aggregations