mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03: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
@ -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…
Reference in New Issue
Block a user