Merge pull request #2630 from charltonaustin/refresh_the_user_management_page_and_not_have_weird_errors_145041479
fix(entity-search.js): fix reload namespace
This commit is contained in:
commit
e52041fc87
2 changed files with 13 additions and 5 deletions
|
@ -68,7 +68,10 @@ angular.module('quay').directive('entitySearch', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.lazyLoad = function() {
|
$scope.lazyLoad = function() {
|
||||||
if (!$scope.namespace || !$scope.lazyLoading) { return; }
|
if (!$scope.namespace || !$scope.thisUser || !$scope.lazyLoading) { return; }
|
||||||
|
$scope.isAdmin = UserService.isNamespaceAdmin($scope.namespace);
|
||||||
|
$scope.isOrganization = !!UserService.getOrganization($scope.namespace);
|
||||||
|
|
||||||
|
|
||||||
// Reset the cached teams and robots.
|
// Reset the cached teams and robots.
|
||||||
$scope.teams = null;
|
$scope.teams = null;
|
||||||
|
@ -359,8 +362,13 @@ angular.module('quay').directive('entitySearch', function () {
|
||||||
|
|
||||||
$scope.$watch('namespace', function(namespace) {
|
$scope.$watch('namespace', function(namespace) {
|
||||||
if (!namespace) { return; }
|
if (!namespace) { return; }
|
||||||
$scope.isAdmin = UserService.isNamespaceAdmin(namespace);
|
$scope.lazyLoad();
|
||||||
$scope.isOrganization = !!UserService.getOrganization(namespace);
|
});
|
||||||
|
|
||||||
|
UserService.updateUserIn($scope, function(currentUser){
|
||||||
|
if (currentUser.anonymous) { return; }
|
||||||
|
$scope.thisUser = currentUser;
|
||||||
|
$scope.lazyLoad();
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$watch('currentEntity', function(entity) {
|
$scope.$watch('currentEntity', function(entity) {
|
||||||
|
|
|
@ -14,9 +14,9 @@ function(ApiService, CookieService, $rootScope, Config, $location) {
|
||||||
organizations: [],
|
organizations: [],
|
||||||
logins: [],
|
logins: [],
|
||||||
beforeload: true
|
beforeload: true
|
||||||
}
|
};
|
||||||
|
|
||||||
var userService = {}
|
var userService = {};
|
||||||
var _EXTERNAL_SERVICES = ['ldap', 'jwtauthn', 'keystone', 'dex'];
|
var _EXTERNAL_SERVICES = ['ldap', 'jwtauthn', 'keystone', 'dex'];
|
||||||
|
|
||||||
userService.hasEverLoggedIn = function() {
|
userService.hasEverLoggedIn = function() {
|
||||||
|
|
Reference in a new issue