This commit adds code to disable checkbox in permissions panel
if unchecking the checkbox will set the setting to nobody group
and that setting can't be set to nobody group,
Fixes part of #33730.
"role:members" group name is displayed as "Everyone except guests"
in the UI and "role:everyone" group name is displayed as
"Everyone including guests".
This commit moves get_realm_user_groups_for_setting and
get_realm_user_groups_for_dropdown_list_widget functions
from user_groups.ts to group_permission_settings.ts.
This change is needed to avoid import cycles in further
commits to add "Permissions" panel for groups.
We now pass group in functions called while handling group update
events, instead of fetching the groups in those function as we
will need the old setting value in future commits.
This commit adds code to live update the membership status text
when a user is added or removed from a group that is subgroup
of the group opened in the right panel of groups UI.
id_field_name was being used only to set the initial dummy
values for realm settings. We can directly add "_id" to the
setting name instead of having an extra id_field_name field.
As we now allow anonymous groups and settings can be set to any
set of users, there is no benefit in not allowing a setting to
be set to "Owners" group.
If the user is not a direct member, but a member via a subgroup, we will
show the list of subgroups beloging to that group which the current user
is a direct member of in a tooltip. The cursor on the checkmark will be
default in this case instead of a pointer.
In `Group settings` -> `Your groups` and `User Profile Popover` -> `User
groups`, we only listed groups that a user was a direct member of. Now,
we will also list groups that a user is not a direct member of, but
associated via a subgroup.
Fixes#32486.