Skip to content

Commit

Permalink
#1327 Update UserSrv for a better configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed May 22, 2020
1 parent 3cf0d97 commit 55a53c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@
return UserSrv.list(
self.currentUser.organisation,
{
filter: {_is: { locked: false }},
filter: { locked: false },
sort: [{'name': 'asc'}]
}
}
);
},
groups: function() {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/scripts/directives/updatableUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

if(value === true && !cached) {
UserSrv.list(AuthenticationSrv.currentUser.organisation, {
filter: {_is: { locked: false }},
filter: { locked: false },
sort: [{'name': 'asc'}]
})
.then(function(users) {
Expand Down
10 changes: 6 additions & 4 deletions frontend/app/scripts/services/api/UserSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,15 @@
}
];

// Apply filter is defined
if (options && options.filter) {
options.filter._name = 'filter';

operations.push(options.filter);
operations.push({
'_name': 'filter',
'_is': options.filter
});
}

// Sort users by name
// Apply sort is defined
if (options && options.sort) {
operations.push({
'_name': 'sort',
Expand Down

0 comments on commit 55a53c5

Please sign in to comment.