mirror of
https://github.com/discourse/discourse.git
synced 2025-06-24 03:12:49 +08:00
FIX: Group admin tabs showing for non logged in users.
This commit is contained in:
@ -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");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user