1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 22:29:41 +02:00

Set user admin max results and Keycloak sync option

This commit is contained in:
McMatts 2018-08-20 17:17:25 +01:00
parent 2c8b757ff6
commit 351b8dcc12
13 changed files with 100 additions and 31 deletions

View file

@ -14,9 +14,12 @@ import Controller from '@ember/controller';
export default Controller.extend({
userService: service('user'),
globalSvc: service('global'),
syncInProgress: false,
userLimit: 100,
loadUsers(filter) {
this.get('userService').getComplete(filter).then((users) => {
this.get('userService').getComplete(filter, this.get('userLimit')).then((users) => {
this.set('model', users);
});
},
@ -27,7 +30,7 @@ export default Controller.extend({
this.get('model').pushObject(user);
});
},
onAddUsers(list) {
return this.get('userService').addBulk(list).then(() => {
this.loadUsers('');
@ -52,6 +55,14 @@ export default Controller.extend({
onFilter(filter) {
this.loadUsers(filter);
},
onSync() {
this.set('syncInProgress', true);
this.get('globalSvc').syncExternalUsers().then(() => {
this.set('syncInProgress', false);
this.loadUsers('');
});
}
}
});