1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +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

@ -68,11 +68,12 @@ export default Service.extend({
// Returns all active and inactive users for organization.
// Only available for admins and limits results to max. 100 users.
// Takes filter for user search criteria.
getComplete(filter) {
getComplete(filter, limit) {
filter = filter.trim();
if (filter.length > 0) filter = encodeURIComponent(filter);
if (is.null(limit) || is.undefined(limit)) limit = 100;
return this.get('ajax').request(`users?active=0&filter=${filter}`).then((response) => {
return this.get('ajax').request(`users?active=0&filter=${filter}&limit=${limit}`).then((response) => {
if (is.not.array(response)) response = [];
return response.map((obj) => {