Merge pull request #2867 from coreos-inc/invite-only

Add support for invite-only user creation
This commit is contained in:
josephschorr 2017-09-15 14:29:50 -04:00 committed by GitHub
commit fa954466f7
9 changed files with 128 additions and 6 deletions

View file

@ -1218,8 +1218,20 @@
Enable Open User Creation
</div>
<div class="help-text">
If enabled, user accounts can be created by anyone.
Users can always be created in the users panel under this superuser view.
If enabled, user accounts can be created by anyone (unless restricted below to invited users).
Users can always be created in the users panel in this superuser tool, even if this feature is disabled.
</div>
</td>
</tr>
<tr ng-show="config.FEATURE_USER_CREATION && config.FEATURE_MAILING">
<td class="non-input">Invite-only User Creation:</td>
<td colspan="2">
<div class="config-bool-field" binding="config.FEATURE_INVITE_ONLY_USER_CREATION">
Enable Invite-only User Creation
</div>
<div class="help-text">
If enabled, user accounts can only be created when a user has been invited, by e-mail address, to join a team.
Users can always be created in the users panel in this superuser tool, even if this feature is enabled.
</div>
</td>
</tr>

View file

@ -27,8 +27,10 @@
<div class="user-footer-links">
<a ng-click="setView('createAccount')"
quay-show="Features.USER_CREATION && Config.AUTHENTICATION_TYPE == 'Database' && Features.DIRECT_LOGIN"
quay-show="Features.USER_CREATION && Config.AUTHENTICATION_TYPE == 'Database' && Features.DIRECT_LOGIN && !Features.INVITE_ONLY_USER_CREATION"
ng-if="currentView != 'createAccount'">Create Account</a>
<span quay-show="Features.USER_CREATION && Config.AUTHENTICATION_TYPE == 'Database' && Features.DIRECT_LOGIN && Features.INVITE_ONLY_USER_CREATION"
ng-if="currentView != 'createAccount'">Invitation required to sign up</span>
<a ng-click="setView('signin')" ng-if="currentView != 'signin'">Sign In</a>
<a ng-click="setView('forgotPassword')"
quay-show="Features.MAILING && Config.AUTHENTICATION_TYPE == 'Database' && Features.DIRECT_LOGIN"