FIX: Group admin tabs showing for non logged in users.

This commit is contained in:
Guo Xiang Tan 2016-12-29 11:52:07 +08:00
parent dd4937a493
commit 3c4920d234
2 changed files with 4 additions and 3 deletions

View File

@ -66,6 +66,8 @@ export default Ember.Controller.extend({
} else {
display = admin || isGroupOwner;
}
} else if (t.get('requiresGroupAdmin')) {
display = false;
}
return display;

View File

@ -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");
});
});