google-nomulus/javatests/google/registry/ui/server
guyben 84a0ace2ea Clean up registrar console login flow
Replaced the plethora of inter winding access functions and inputs in SessionUtils with just 2 functions, that both accept the same type for the user (AuthResult):

guessRegistrarForUser: given an AuthResult, finds a registrar that they have access to. If none is found - a ForbiddenException is thrown.

getRegistrarForUser[Cached]: (maybe should be called getRegistrarOnBehalfOfUser?) given an AuthResult and a clientId, loads and returns the registrar ONLY IF the user has access to it. Otherwise throws a ForbiddenException.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214630657
2018-10-03 11:57:34 -04:00
..
registrar Clean up registrar console login flow 2018-10-03 11:57:34 -04:00
BUILD Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
RegistrarFormFieldsTest.java Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00