google-nomulus/java/google/registry/ui/js
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
..
registrar Allow admins read-only access to all registrars 2018-10-03 12:10:28 -04:00
BUILD Update Nomulus to build with bazel 0.16.0 2018-08-10 13:46:48 -04:00
component.js Replace uses of @code in Javascript documentation with Markdown backticks 2018-02-05 23:51:49 -05:00
console.js Remove final uses of @code in JS comments 2018-03-06 18:51:32 -05:00
edit_item.js Remove final uses of @code in JS comments 2018-03-06 18:51:32 -05:00
forms.js Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
menu_button.js Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
resource.js Send the "resource" ID in each resource action 2018-10-03 11:55:50 -04:00
resource_component.js Use JSON.parse instead of deprecated goog.json.parse. 2017-08-29 17:12:44 -04:00
session.js Change from ES6 Map to old-fashioned object 2018-09-20 11:19:36 -04:00
util.js Remove final uses of @code in JS comments 2018-03-06 18:51:32 -05:00
xml.js Update copyright year on all license headers 2017-02-02 16:27:22 -05:00