user_groups: Add can_manage_group field to user_group object.

This commit adds can_manage_group field in user_group
object in frontend and also adds code to update the field
value from server events.
This commit is contained in:
Ujjawal Modi
2023-08-04 19:15:37 +05:30
committed by Tim Abbott
parent 5d613ce98d
commit 20229d0d3d
5 changed files with 15 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ run_test("user_groups", () => {
members: new Set([1, 2]),
is_system_group: false,
direct_subgroup_ids: new Set([4, 5]),
can_manage_group: 1,
can_mention_group: 2,
};
@@ -35,6 +36,7 @@ run_test("user_groups", () => {
members: new Set([3]),
is_system_group: false,
direct_subgroup_ids: new Set([]),
can_manage_group: 1,
can_mention_group: 2,
};
const all = {
@@ -43,6 +45,7 @@ run_test("user_groups", () => {
members: new Set([1, 2, 3]),
is_system_group: false,
direct_subgroup_ids: new Set([4, 5, 6]),
can_manage_group: 1,
can_mention_group: 1,
};