mirror of
https://github.com/google/nomulus.git
synced 2025-08-05 17:28:25 +02:00
Add web console for creating registrars
This console is only to be used by Admins (either GAE admins for this project, or Support accounts). It is for "internal" use only, not for use by the registrars themselves. To prevent abuse, the registrar is created in a non-functional PENDING state and can only be made functional from the nomulus shell tool. While in "PENDING" state, the registrar can be updated from the registrar-console by admins. Also - moving all the web consoles to the same directory (moving the otesetup/* files into registrar/) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=229681011
This commit is contained in:
parent
758dcb5c39
commit
9aa7b69921
20 changed files with 1277 additions and 138 deletions
188
java/google/registry/ui/soy/registrar/OteSetupConsole.soy
Normal file
188
java/google/registry/ui/soy/registrar/OteSetupConsole.soy
Normal file
|
@ -0,0 +1,188 @@
|
|||
// Copyright 2018 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
{namespace registry.soy.registrar.otesetup}
|
||||
|
||||
|
||||
/**
|
||||
* Main page for the OT&E creation. Holds a form with the required data.
|
||||
*/
|
||||
{template .formPage}
|
||||
{@param xsrfToken: string} /** Security token. */
|
||||
{@param username: string} /** Arbitrary username to display. */
|
||||
{@param logoutUrl: string} /** Generated URL for logging out of Google. */
|
||||
{@param productName: string} /** Name to display for this software product. */
|
||||
{@param logoFilename: string}
|
||||
{@param? errorMessage: string} /** If set - display the error message above the form. */
|
||||
{@param? baseClientId: string} /** If set - an initial value to fill for the base client ID. */
|
||||
{@param? contactEmail: string} /** If set - an initial value to fill for the email. */
|
||||
|
||||
{call registry.soy.console.header}
|
||||
{param app: 'registrar' /}
|
||||
{param subtitle: 'OT&E setup' /}
|
||||
{/call}
|
||||
{call registry.soy.console.googlebar data="all" /}
|
||||
<div id="reg-content-and-footer">
|
||||
<div id="reg-content">
|
||||
<h1>Setup OT&E</h1>
|
||||
{if isNonnull($errorMessage)}
|
||||
<h2 class="{css('kd-errormessage')}">Failed: {$errorMessage}</h2>
|
||||
{/if}
|
||||
{call .form_ data="all" /}
|
||||
</div>
|
||||
{call registry.soy.console.footer /}
|
||||
</div>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Result page for a successful OT&E setup.
|
||||
*/
|
||||
{template .resultSuccess}
|
||||
{@param baseClientId: string} /** The base clientId used for the OT&E setup. */
|
||||
{@param contactEmail: string} /** The contact's email added to the registrars. */
|
||||
{@param clientIdToTld: map<string, string>} /** The created registrars->TLD mapping. */
|
||||
{@param password: string} /** The password given for the created registrars. */
|
||||
{@param username: string} /** Arbitrary username to display. */
|
||||
{@param logoutUrl: string} /** Generated URL for logging out of Google. */
|
||||
{@param productName: string} /** Name to display for this software product. */
|
||||
{@param logoFilename: string}
|
||||
|
||||
{call registry.soy.console.header}
|
||||
{param app: 'registrar' /}
|
||||
{param subtitle: 'OT&E setup' /}
|
||||
{/call}
|
||||
{call registry.soy.console.googlebar data="all" /}
|
||||
<div id="reg-content-and-footer">
|
||||
<div id="reg-content" class="{css('item')} {css('registrar')}">
|
||||
<h1>OT&E successfully created for registrar {$baseClientId}!</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="{css('setting-label')}">EPP credentials</label>
|
||||
<span class="{css('description')}">Copy and paste this into an email to the registrars</span>
|
||||
</td>
|
||||
<td class="{css('setting')}">
|
||||
<textarea rows="7" cols="100" readonly>
|
||||
{for $clientId in mapKeys($clientIdToTld)}
|
||||
Login: {$clientId}{sp}{sp}{sp}{sp}{sp}{sp}
|
||||
Password: {$password}{sp}{sp}{sp}{sp}{sp}{sp}
|
||||
TLD: {$clientIdToTld[$clientId]}{sp}{sp}{sp}{sp}{sp}{sp}{\n}
|
||||
{/for}
|
||||
</textarea>
|
||||
</td>
|
||||
</table>
|
||||
Gave <label>{$contactEmail}</label> web-console access to these registrars.
|
||||
<h1>Don't forget to set the <label>Certificate</label> and <label>IP-whitelist</label> for these Registrars!</h1>
|
||||
Links to the security page for your convenience:<br>
|
||||
{for $clientId in mapKeys($clientIdToTld)}
|
||||
<a href="/registrar?clientId={$clientId}#security-settings" target="_blank">{$clientId}</a><br>
|
||||
{/for}
|
||||
</div>
|
||||
{call registry.soy.console.footer /}
|
||||
</div>
|
||||
{/template}
|
||||
|
||||
|
||||
/** Form for getting registrar info. */
|
||||
{template .form_ visibility="private"}
|
||||
{@param xsrfToken: string} /** Security token. */
|
||||
{@param? baseClientId: string} /** If set - an initial value to fill for the base client ID. */
|
||||
{@param? contactEmail: string} /** If set - an initial value to fill for the email. */
|
||||
<form name="item" class="{css('item')}" method="post" action="/registrar-ote-setup">
|
||||
<table>
|
||||
<tr class="{css('kd-settings-pane-section')}">
|
||||
<td>
|
||||
{call registry.soy.forms.inputFieldLabel}
|
||||
{param label: 'Base client ID' /}
|
||||
{/call}
|
||||
</td>
|
||||
<td class="{css('setting')}">
|
||||
{call registry.soy.forms.inputFieldValue }
|
||||
{param name: 'clientId' /}
|
||||
{param value: $baseClientId /}
|
||||
{param placeholder: 'registrar\'s ID' /}
|
||||
{param required: true /}
|
||||
{/call}
|
||||
<span class="{css('description')}">
|
||||
Must consist of 3-14 lower-case letters and numbers.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue}
|
||||
{param label: 'Contact email' /}
|
||||
{param name: 'email' /}
|
||||
{param value: $contactEmail /}
|
||||
{param placeholder: 'registrar\'s assigned email' /}
|
||||
{param description kind="text"}
|
||||
Will be granted web-console access to the OTE registrars.
|
||||
{/param}
|
||||
{param required: true /}
|
||||
{/call}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<hr>
|
||||
<h1>Optional fields</h1>
|
||||
Don't fill unless you have a good reason to.
|
||||
</td>
|
||||
</tr>
|
||||
{call registry.soy.forms.inputFieldRowWithValue}
|
||||
{param label: 'EPP password' /}
|
||||
{param name: 'password' /}
|
||||
{param placeholder: 'Optional' /}
|
||||
{param description kind="text"}
|
||||
The password used to for EPP login. Leave blank to auto-generate.
|
||||
{/param}
|
||||
{/call}
|
||||
{call registry.soy.forms.submitRow}
|
||||
{param label: 'create' /}
|
||||
{/call}
|
||||
</table>
|
||||
<input type="hidden" name="xsrfToken" value="{$xsrfToken}">
|
||||
</form>
|
||||
{/template}
|
||||
|
||||
|
||||
/**
|
||||
* Who goes thar?!
|
||||
*/
|
||||
{template .whoareyou}
|
||||
{@param username: string} /** Arbitrary username to display. */
|
||||
{@param logoutUrl: string} /** Generated URL for logging out of Google. */
|
||||
{@param logoFilename: string}
|
||||
{@param productName: string}
|
||||
{call registry.soy.console.header}
|
||||
{param app: 'registrar' /}
|
||||
{param subtitle: 'Not Authorized' /}
|
||||
{/call}
|
||||
<div class="{css('whoAreYou')}">
|
||||
<a class="{css('logo')}" href="/registrar">
|
||||
<img src="/assets/images/{$logoFilename}" alt="{$productName}">
|
||||
</a>
|
||||
<h1>You need permission</h1>
|
||||
<p>
|
||||
Only {$productName} Admins have access to this page.
|
||||
You are signed in as <strong>{$username}</strong>.
|
||||
<div>
|
||||
<a href="{$logoutUrl}"
|
||||
class="{css('kd-button')} {css('kd-button-submit')}"
|
||||
tabindex="-1">Logout and switch to another account</a>{sp}
|
||||
<a href="/registrar"
|
||||
class="{css('kd-button')} {css('kd-button-submit')}"
|
||||
tabindex="-1">Go to the Registrar web console</a>
|
||||
</div>
|
||||
</div>
|
||||
{/template}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue