1e3b354201
When a user now logs in for the first time for any external auth (LDAP, JWT, Keystone, Github, Google, Dex), they will be presented with a confirmation screen that affords them the opportunity to change their Quay-assigned username. Addresses most of the user issues around #74
33 lines
No EOL
948 B
JavaScript
33 lines
No EOL
948 B
JavaScript
/**
|
|
* An element which displays an input box for creating a namespace.
|
|
*/
|
|
angular.module('quay').directive('namespaceInput', function () {
|
|
var directiveDefinitionObject = {
|
|
priority: 0,
|
|
templateUrl: '/static/directives/namespace-input.html',
|
|
replace: false,
|
|
transclude: true,
|
|
restrict: 'C',
|
|
scope: {
|
|
'binding': '=binding',
|
|
'isBackIncompat': '=isBackIncompat',
|
|
'hasExternalError': '=?hasExternalError',
|
|
|
|
'namespaceTitle': '@namespaceTitle',
|
|
},
|
|
controller: function($scope, $element) {
|
|
$scope.USERNAME_PATTERN = USERNAME_PATTERN;
|
|
$scope.usernamePattern = new RegExp(USERNAME_PATTERN);
|
|
|
|
$scope.$watch('binding', function(binding) {
|
|
if (!binding) {
|
|
$scope.isBackIncompat = false;
|
|
return;
|
|
}
|
|
|
|
$scope.isBackIncompat = (binding.indexOf('-') > 0 || binding.indexOf('.') > 0);
|
|
})
|
|
}
|
|
};
|
|
return directiveDefinitionObject;
|
|
}); |