mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
🐛 Fixed admin loading member counts for authors and editors
no issue When using admin as a user with author or editor permissions, admin tried to load the member counts in order to display them in the menu. But authors and editors are not allowed to see the members. So the request returned a 403. It is not necessary to load the member counts for authors and editors, so we can just skip the request.
This commit is contained in:
parent
cf5c64f96b
commit
d34f07f408
@ -71,7 +71,10 @@ export default class Main extends Component.extend(ShortcutsMixin) {
|
||||
didReceiveAttrs() {
|
||||
super.didReceiveAttrs(...arguments);
|
||||
this._setIconStyle();
|
||||
this._loadMemberCountsTask.perform();
|
||||
|
||||
if (this.session.user && this.session.user.isAdmin) {
|
||||
this._loadMemberCountsTask.perform();
|
||||
}
|
||||
}
|
||||
|
||||
didInsertElement() {
|
||||
|
Loading…
Reference in New Issue
Block a user