FIX: Group admin tabs showing for non logged in users.
This commit is contained in:
parent
dd4937a493
commit
3c4920d234
|
@ -66,6 +66,8 @@ export default Ember.Controller.extend({
|
||||||
} else {
|
} else {
|
||||||
display = admin || isGroupOwner;
|
display = admin || isGroupOwner;
|
||||||
}
|
}
|
||||||
|
} else if (t.get('requiresGroupAdmin')) {
|
||||||
|
display = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return display;
|
return display;
|
||||||
|
|
|
@ -48,9 +48,8 @@ test("Viewing Group", () => {
|
||||||
0,
|
0,
|
||||||
'it should not show messages tab if user is not a group user or admin'
|
'it should not show messages tab if user is not a group user or 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-stacked 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(find(".nav-stacked 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");
|
ok(count('.user-stream .item') > 0, "it lists stream items");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue