guest: Restrict guest access to user group creation and updation.

This commit is contained in:
Shubham Dhama
2018-06-14 12:05:05 +05:30
committed by Tim Abbott
parent 05323e776e
commit 8e032376f9
5 changed files with 73 additions and 0 deletions

View File

@@ -25,8 +25,13 @@ exports.can_edit = function (group_id) {
return true;
}
if (page_params.is_guest) {
return false;
}
return user_groups.is_member_of(group_id, people.my_current_user_id());
};
exports.populate_user_groups = function () {
var user_groups_section = $('#user-groups').expectOne();