Make email addresses optional in external auth if email feature is turned off

Before this change, external auth such as Keystone would fail if a user without an email address tried to login, even if the email feature was disabled.
This commit is contained in:
Joseph Schorr 2016-09-08 12:24:47 -04:00
parent 934cdecbd6
commit d7f56350a4
18 changed files with 206 additions and 93 deletions

View file

@ -10,7 +10,7 @@
})
}]);
function OrgViewCtrl($scope, $routeParams, $timeout, ApiService, UIService, AvatarService) {
function OrgViewCtrl($scope, $routeParams, $timeout, ApiService, UIService, AvatarService, Config, Features) {
var orgname = $routeParams.orgname;
$scope.namespace = orgname;
@ -22,6 +22,9 @@
$scope.changeEmailInfo = null;
$scope.context = {};
$scope.Config = Config;
$scope.Features = Features;
$scope.orgScope = {
'changingOrganization': false,
'organizationEmail': ''

View file

@ -54,7 +54,7 @@
<span class="description">This will also be the namespace for your repositories. Must be alphanumeric, all lowercase and at least four characters long.</span>
</div>
<div class="form-group nested">
<div class="form-group nested" quay-require="['MAILING']">
<label for="orgName">Organization Email</label>
<div class="field-row">
<span class="field-container">

View file

@ -106,7 +106,8 @@
<td>
<span class="avatar" size="48" data="organization.avatar"></span>
<div class="help-text" ng-if="Config.AVATAR_KIND == 'local'">Avatar is generated based off the organization's name.</div>
<div class="help-text" ng-if="Config.AVATAR_KIND == 'gravatar'">Avatar is served by <a href="http://gravatar.com" rel="nofollow" target="_blank">Gravatar</a> based on the {{ organization.email }} e-mail address.</div>
<div class="help-text" ng-if="Config.AVATAR_KIND == 'gravatar' && Features.MAILING">Avatar is served by <a href="http://gravatar.com" rel="nofollow" target="_blank">Gravatar</a> based on the {{ organization.email }} e-mail address.</div>
<div class="help-text" ng-if="Config.AVATAR_KIND == 'gravatar' && !Features.MAILING">Avatar is served by <a href="http://gravatar.com" rel="nofollow" target="_blank">Gravatar</a> based on the unique ID: {{ organization.email }}.</div>
</td>
</tr>
<tr quay-show="Features.MAILING">