Skip to content

Commit

Permalink
FIX: Group admin tabs showing for non logged in users.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxworld committed Dec 29, 2016
1 parent dd4937a commit 3c4920d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/discourse/controllers/group.js.es6
Expand Up @@ -66,6 +66,8 @@ export default Ember.Controller.extend({
} else {
display = admin || isGroupOwner;
}
} else if (t.get('requiresGroupAdmin')) {
display = false;
}

return display;
Expand Down
5 changes: 2 additions & 3 deletions test/javascripts/acceptance/groups-test.js.es6
Expand Up @@ -48,9 +48,8 @@ test("Viewing Group", () => {
0,
'it should not show messages tab if user is not a group user or admin'
);

ok(find(".nav-stacked li a[title='Edit Group']").length === 0, 'it should not show messages tab if user is not admin');
ok(find(".nav-stacked li a[title='Logs']").length === 0, 'it should not show Logs tab if user is not admin');
ok(find(".nav-pills li a[title='Edit Group']").length === 0, 'it should not show messages tab if user is not admin');
ok(find(".nav-pills li a[title='Logs']").length === 0, 'it should not show Logs tab if user is not admin');
ok(count('.user-stream .item') > 0, "it lists stream items");
});
});
Expand Down

0 comments on commit 3c4920d

Please sign in to comment.