FIX: Group page tabs not displaying for normal users.

This commit is contained in:
Guo Xiang Tan 2017-01-03 17:56:13 +08:00
parent c68bcfeb72
commit a9a0e626db

View File

@ -58,14 +58,8 @@ export default Ember.Controller.extend({
return this.get('tabs').filter(t => {
let display = true;
if (this.currentUser) {
let admin = this.currentUser.admin;
if (automatic && t.get('requiresGroupAdmin')) {
display = false;
} else {
display = admin || isGroupOwner;
}
if (this.currentUser && t.get('requiresGroupAdmin')) {
display = automatic ? false : (this.currentUser.admin || isGroupOwner);
} else if (t.get('requiresGroupAdmin')) {
display = false;
}