mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed staff limit check query to take into account inactive users
refs https://github.com/TryGhost/Team/issues/587 - Users with 'inactive' status should not be counted towards the "staff" limit
This commit is contained in:
parent
25debab71d
commit
de97328c42
1 changed files with 3 additions and 1 deletions
|
@ -74,7 +74,9 @@ export default class LimitsService extends Service {
|
|||
users: this.store.findAll('user', {reload: true}),
|
||||
invites: this.store.findAll('invite', {reload: true})
|
||||
}).then((data) => {
|
||||
return data.users.length + data.invites.length;
|
||||
const activeUsers = data.users.filter(u => u.status !== 'inactive');
|
||||
|
||||
return activeUsers.length + data.invites.length;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue