Files
redash/client/app/pages/users/new.html
Omer Lachish 26252be75a Verify admin email address (#3267)
* add an  bit

* prompt on homepage when user's email hasn't been verified

* set e-mail as verified for new setups and invited users

* 👋 copy & paste invite links, it's time for verified e-mails!

* default `is_invitation_pending` to false and actively set it to true
when inviting users, so that existing users won't show "Invitation
Pending"

* fix tests that broke due to default is_invitation_pending value

* treat admin's e-mail address as verified

* add verification endpoint

* send verification e-mail

* Update client/app/components/empty-state/empty-state.html

Co-Authored-By: rauchy <omer@rauchy.net>

* Update redash/authentication/account.py

Co-Authored-By: rauchy <omer@rauchy.net>

* Update redash/handlers/authentication.py

Co-Authored-By: rauchy <omer@rauchy.net>

* Update redash/templates/emails/verify.html

Co-Authored-By: rauchy <omer@rauchy.net>

* Update redash/authentication/account.py

Co-Authored-By: rauchy <omer@rauchy.net>

* Update redash/templates/verify.html

Co-Authored-By: rauchy <omer@rauchy.net>

* Update redash/templates/emails/verify.txt

Co-Authored-By: rauchy <omer@rauchy.net>

* add link in case redirects are disabled

* POSTing to /email_verification makes more sense than GETting /send_verification

* avoid sending invitations when no_invite is passed along

* Update client/app/pages/users/new.html

Co-Authored-By: rauchy <omer@rauchy.net>

* move e-mail verification prompt to home-page

* get rid of redundant $scope

* return JSON

* flip is_email_verified's default value so that existing users do not
show as not-verified

* e-mail verification propmt isn't dangerous, it just wants to warn you
2019-01-13 13:57:12 +02:00

33 lines
1.4 KiB
HTML

<settings-screen>
<email-settings-warning function="'invite emails'"></email-settings-warning>
<div class="row">
<div class="col-md-4 col-md-offset-4 creation-container">
<h3>New User</h3>
<form class="form" name="$ctrl.userForm" ng-submit="saveUser()" novalidate>
<div class="form-group required" ng-class="{ 'has-error': ($ctrl.userForm.name | showError )}">
<label class="control-label">Name</label>
<input type="text" name="name" class="form-control" ng-model="user.name" ng-disabled="user.created" required/ autofocus>
<error-messages input="$ctrl.userForm.name" form="$ctrl.userForm"></error-messages>
</div>
<div class="form-group required" ng-class="{ 'has-error': ($ctrl.userForm.email | showError ) }">
<label class="control-label">Email</label>
<input name="email" type="email" class="form-control" ng-model="user.email" ng-disabled="user.created" required/>
<error-messages input="$ctrl.userForm.email" form="$ctrl.userForm"></error-messages>
</div>
<div class="form-group" ng-if="!user.created">
<button class="btn btn-primary">Create user</button>
</div>
<div ng-if="user.created" class="alert alert-success alert-invited">
<h4>The user has been created and should receive an invite email soon.</h4>
</div>
</form>
</div>
</div>
</settings-screen>