google-nomulus/java/google/registry/ui
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
..
assets/images Delete all Braintree code 2018-07-14 01:37:03 -04:00
css Delete all Braintree code 2018-07-14 01:37:03 -04:00
epptmpl mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
externs Update Nomulus to build with bazel 0.16.0 2018-08-10 13:46:48 -04:00
forms Use java-8 functionals in FormFields 2018-04-23 14:56:18 -04:00
html Run buildifier on codebase to format BUILD files 2016-11-28 18:15:21 -05:00
js Allow admins read-only access to all registrars 2018-10-03 12:10:28 -04:00
server Allow admins read-only access to all registrars 2018-10-03 12:10:28 -04:00
soy Allow admins read-only access to all registrars 2018-10-03 12:10:28 -04:00
BUILD Delete all Braintree code 2018-07-14 01:37:03 -04:00
compile_test.js Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
conformance_proto.txt mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
ConsoleDebug.java Delete all Braintree code 2018-07-14 01:37:03 -04:00
globals.txt Rename Java packages to use the .google TLD 2016-05-13 20:04:42 -04:00
package-info.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00