mirror of
https://github.com/google/nomulus.git
synced 2025-05-19 18:59:35 +02:00
Decouple superuser from SessionMetadata
Superuser should only be settable via the tool (see [] which is merged in here but not diffbased, and which removes the implicit superuser for CharlestonRoad). It is a property of the request, not of the session (there are no sessions in the tool). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125204707
This commit is contained in:
parent
e359ab5f52
commit
fd6c4888db
44 changed files with 80 additions and 136 deletions
|
@ -14,7 +14,6 @@
|
|||
|
||||
package google.registry.flows.session;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.testing.DatastoreHelper.deleteResource;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
|
||||
|
@ -76,21 +75,6 @@ public abstract class LoginFlowTestCase extends FlowTestCase<LoginFlow> {
|
|||
@Test
|
||||
public void testSuccess() throws Exception {
|
||||
doSuccessfulTest("login_valid.xml");
|
||||
assertThat(sessionMetadata.isSuperuser()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_superuser() throws Exception {
|
||||
persistResource(getRegistrarBuilder().setIanaIdentifier(9999L).build());
|
||||
doSuccessfulTest("login_valid.xml");
|
||||
assertThat(sessionMetadata.isSuperuser()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_notSuperuser() throws Exception {
|
||||
persistResource(getRegistrarBuilder().setIanaIdentifier(15L).build());
|
||||
doSuccessfulTest("login_valid.xml");
|
||||
assertThat(sessionMetadata.isSuperuser()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue