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
1 changed files with 2 additions and 8 deletions

View File

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