google-nomulus/java/google/registry
nickfelt ceb5c2117e Decouple GaeUserCredentials from UserService and simplify tests
This disentangles GaeUserCredentials and UserService, which lets us remove a
bunch of hacky and brittle code from LoginFlowViaConsoleTest.

Previously, GaeUserCredentials was constructed for a user, but then was still
directly calling UserService to check if the user was an admin.  UserService
can be adjusted in tests (via AppEngineRule / LocalServiceTestHelper) but it's
a pain, especially to do dynamically within a single test file.  The hacky
code in LoginFlowViaConsoleTest was working around that restriction.

With this CL, you can pass into GaeUserCredentials whether the user is an
admin or not (for testing) or construct one directly from a UserService object
(for production, and for convenience in tests using an AppEngineRule user).

Note that I also changed EppConsoleAction to @Inject UserService.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132696391
2016-09-14 15:36:53 -04:00
..
backup MOE strip compatible_with 2016-08-02 19:14:28 -04:00
bigquery Narrowly scope privileges for API service objects 2016-08-02 19:18:09 -04:00
billing MOE strip compatible_with 2016-08-02 19:14:28 -04:00
braintree MOE strip compatible_with 2016-08-02 19:14:28 -04:00
builddefs Use zip_rule() for EAR/WAR deploy archives 2016-08-02 21:00:39 -04:00
config Refactor EppMetrics into the EppMetric value type 2016-09-07 12:19:22 -04:00
cron MOE strip compatible_with 2016-08-02 19:14:28 -04:00
dns Don't use modules to instantiate classes 2016-09-07 12:17:58 -04:00
eclipse Integrate: Eclipse file generation script 2016-05-16 18:39:45 -04:00
env Convert straggler GAE modules to basic-scaling 2016-09-14 15:33:57 -04:00
export Export LrpToken to BigQuery 2016-09-07 11:51:28 -04:00
flows Decouple GaeUserCredentials from UserService and simplify tests 2016-09-14 15:36:53 -04:00
gcs Add escrow file import validation logic 2016-08-02 19:22:30 -04:00
groups Narrowly scope privileges for API service objects 2016-08-02 19:18:09 -04:00
idn Rename Java packages to use the .google TLD 2016-05-13 20:04:42 -04:00
keyring/api Replace VoidKeyring with InMemoryKeyring and a dummy module 2016-09-07 12:15:08 -04:00
loadtest MOE strip compatible_with 2016-08-02 19:14:28 -04:00
mapreduce DeReference the codebase 2016-09-02 13:50:20 -04:00
model Add extra logic for all relevant flows 2016-09-14 15:26:36 -04:00
module Remove straggling JarKeyring link and sort MOE-added imports 2016-09-14 15:29:30 -04:00
monitoring Fix incorrect field name in EppMetric 2016-09-14 15:35:25 -04:00
pricing Add extra logic for all relevant flows 2016-09-14 15:26:36 -04:00
rdap DeReference the codebase 2016-09-02 13:50:20 -04:00
rde DeReference the codebase 2016-09-02 13:50:20 -04:00
request Fix NullPointerException in group syncing 2016-09-14 15:25:07 -04:00
security MOE strip compatible_with 2016-08-02 19:14:28 -04:00
storage/drive MOE strip compatible_with 2016-08-02 19:14:28 -04:00
tldconfig/idn MOE strip compatible_with 2016-08-02 19:14:28 -04:00
tmch MOE strip compatible_with 2016-08-02 19:14:28 -04:00
tools Remove straggling JarKeyring link and sort MOE-added imports 2016-09-14 15:29:30 -04:00
ui Remove unused redirectIfNotLoggedIn() method 2016-08-22 14:41:41 -04:00
util MOE strip compatible_with 2016-08-02 19:14:28 -04:00
whois DeReference the codebase 2016-09-02 13:50:20 -04:00
xjc Clean up some genrule() script code 2016-08-05 20:40:39 -04:00
xml MOE strip compatible_with 2016-08-02 19:14:28 -04:00
BUILD Mark rest of Domain Registry for App Engine compatibility 2016-08-26 09:48:37 -04:00
repositories.bzl Add StackDriver implementation, in monitoring/metrics package 2016-08-15 17:12:35 -04:00