mirror of
https://github.com/quay/quay.git
synced 2025-04-18 10:44:06 +03:00
Adds ACCOUNT_RECOVERY_MODE to allow Quay to run with some core features disabled. When this is set, the instance should only be used in order by existing users who hasn't linked their account to an external login service, after database authentication has been disabled.
30 lines
888 B
JavaScript
30 lines
888 B
JavaScript
/**
|
|
* An element which displays a message for users to read.
|
|
*/
|
|
angular.module('quay').directive('quayMessageBar', function () {
|
|
return {
|
|
priority: 0,
|
|
templateUrl: '/static/directives/quay-message-bar.html',
|
|
replace: false,
|
|
transclude: false,
|
|
restrict: 'C',
|
|
scope: {},
|
|
controller: function ($scope, $element, $rootScope, ApiService, NotificationService,
|
|
StateService) {
|
|
$scope.messages = [];
|
|
$scope.NotificationService = NotificationService;
|
|
|
|
StateService.updateStateIn($scope, function(state) {
|
|
$scope.inReadOnlyMode = state.inReadOnlyMode;
|
|
$scope.inAccountRecoveryMode = state.inAccountRecoveryMode;
|
|
});
|
|
|
|
ApiService.getGlobalMessages().then(function (data) {
|
|
$scope.messages = data['messages'] || [];
|
|
}, function (resp) {
|
|
return true;
|
|
});
|
|
}
|
|
};
|
|
});
|