FIX: ensures user has groups
This commit is contained in:
parent
2acab3ba89
commit
844f96d146
|
@ -12,10 +12,13 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
init(args) {
|
init(args) {
|
||||||
this.set("group", args.group);
|
this.set("group", args.group);
|
||||||
if (this.currentUser.groups.some(g => g.id === this.group.id)) {
|
if (
|
||||||
|
(this.get("currentUser.groups") || []).some(g => g.id === this.group.id)
|
||||||
|
) {
|
||||||
// User is a part of the group. Now check if the group has reports
|
// User is a part of the group. Now check if the group has reports
|
||||||
this.checkForReports();
|
this.checkForReports();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._super(args);
|
this._super(args);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue