mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Group page tabs not displaying for normal users.
This commit is contained in:
parent
c68bcfeb72
commit
a9a0e626db
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user