google-nomulus/java/google/registry
guyben 1d621bd14d Allow admins read-only access to all registrars
We want to be able to view / test / debug how the registrar console looks for our clients.

However, we don't want to accidentally change the data for registrars, especially in a "non-accountable" way (where we later don't know who did that change)

So we do 2 things here:

- Add a "mode" (read-only and read-write) to the getRegistrarForUser function. We set it according to what we want to do with the registrar. Currently, read-write is only requested for the "update" RegistrarSetting action. Admins will have read-only access to all registrars, but read-write access only to the "admin registrar" (or whatever registrar they are contacts for).

- Support an undocumented "clientId=XXX" query param that replaces the "guessClientIdForUser" function in the original page load. We can then set it when we want to view a different account.

We also change the navigation links on the HTML page to preserve the query.

-------------------------

This might be used also for a better user experience for our clients, especially those with multiple "clientId"s (some registrar entities have multiple "registrar" objects)

Currently, they have to have a separate user for each clientId, and only have one user allowed which has both read and write permissions.

Using this change, we can give them the possibility to add users on their own, some with read-only access (to view billing information without being able to change anything), and use a single user for all their clientIds.

-------------------------

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215480610
2018-10-03 12:10:28 -04:00
..
backup Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
batch Delete the verify entity integrity mapreduce 2018-09-20 11:19:36 -04:00
beam Handle Purchase Order numbers explicitly in billing pipeline 2018-09-20 11:19:36 -04:00
bigquery Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
builddefs Remove the deprecated, now no-op, "data" transition 2018-08-10 13:44:25 -04:00
config Delete unused default registrar referral URL 2018-10-03 12:02:29 -04:00
cron Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
dns Update dependencies to satisfy strictness and remove -jpl_strict_deps feature 2018-09-14 21:33:08 -04:00
env Delete the verify entity integrity mapreduce 2018-09-20 11:19:36 -04:00
export Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
flows Remove checking of SNI headers 2018-09-14 21:34:44 -04:00
gcs Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
groups Refactor DelegatedCredential provisioning for GSuite domains 2018-09-11 14:18:41 -04:00
idn Update IDN tables to comply with https://www.iana.org/help/idn-repository-procedure 2018-02-01 21:59:14 -05:00
keyring Introduce simplified Default credential provision 2018-09-08 00:16:09 -04:00
loadtest Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
mapreduce Use locking on async mapreduces 2018-08-10 13:44:25 -04:00
model Index the allocation token's redemption history entry field 2018-10-03 11:52:31 -04:00
module Allow admins read-only access to all registrars 2018-10-03 12:10:28 -04:00
monitoring/whitebox Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
pricing Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
proxy Move GCP proxy code to the old [] proxy's location 2018-09-20 11:19:36 -04:00
rdap Allow admins read-only access to all registrars 2018-10-03 12:10:28 -04:00
rde Move the RDE TAR file encoding to a dedicated file 2018-08-10 13:46:48 -04:00
reporting Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
request Remove outdated credential modules 2018-10-03 12:08:55 -04:00
security Improve internal build system speed 2018-06-27 15:28:52 -04:00
storage/drive Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
tldconfig/idn Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
tmch Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
tools Remove outdated credential modules 2018-10-03 12:08:55 -04:00
ui Allow admins read-only access to all registrars 2018-10-03 12:10:28 -04:00
util Add newline after closing boundary in multipart upload of LORDN 2018-09-14 11:49:12 -04:00
whois Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
xjc Run bazel installer as a argument to bash 2018-08-10 13:44:25 -04:00
xml Pretty-print actual XML in tests 2018-07-14 01:37:03 -04:00
BUILD Remove deprecated DNS subsystem 2018-09-14 12:01:08 -04:00
repositories.bzl Add dependency on diffutils 2018-10-03 12:04:04 -04:00