Show email as fallback when a user has no username yet

This commit is contained in:
Johannes Zellner
2018-03-05 12:14:20 +01:00
parent 09149318b1
commit 451c697fb7
2 changed files with 4 additions and 1 deletions

View File

@@ -83,7 +83,7 @@
<div style="margin-left: 20px;">
<div class="col-md-5">
Users:
<multiselect class="input-sm stretch" ng-model="appConfigure.accessRestriction.users" ng-disabled="appConfigure.accessRestrictionOption !== 'groups'" options="user.username for user in users" data-multiple="true"></multiselect>
<multiselect class="input-sm stretch" ng-model="appConfigure.accessRestriction.users" ng-disabled="appConfigure.accessRestrictionOption !== 'groups'" options="user.display for user in users" data-multiple="true"></multiselect>
</div>
<div class="col-md-5">

View File

@@ -443,6 +443,9 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
return $timeout(fetchUsers, 5000);
}
// ensure we have something to work with in the access restriction dropdowns
users.forEach(function (user) { user.display = user.username || user.email; });
$scope.users = users;
});
}