pub struct GroupPermissionSetting { /* private fields */ }Expand description
Represents configuration for a group permission setting specifying the groups to which the setting can be set to and the default values for the setting.
Changes: Removed allow_owners_group field in Zulip 10.0 (feature level 326), as we now support anonymous user groups.
Previously, the role:owners system group was not offered when allow_owners_group was false.
Removed unnecessary id_field_name field in Zulip 10.0 (feature level 326).
Previously, this always had the value of \"{setting_name}_id\";
it was an internal implementation detail of the server not intended to be included in the API.
Implementations§
Source§impl GroupPermissionSetting
impl GroupPermissionSetting
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new GroupPermissionSetting.
Source§impl GroupPermissionSetting
impl GroupPermissionSetting
Sourcepub const fn require_system_group(&self) -> Option<bool>
pub const fn require_system_group(&self) -> Option<bool>
Gets the GroupPermissionSetting require_system_group.
Whether the setting can only be set to a system user group.
Sourcepub fn set_require_system_group(&mut self, val: bool)
pub fn set_require_system_group(&mut self, val: bool)
Sets the GroupPermissionSetting require_system_group.
Whether the setting can only be set to a system user group.
Sourcepub fn unset_require_system_group(&mut self) -> Option<bool>
pub fn unset_require_system_group(&mut self) -> Option<bool>
Unsets the GroupPermissionSetting require_system_group.
Whether the setting can only be set to a system user group.
Sourcepub fn with_require_system_group(self, val: bool) -> Self
pub fn with_require_system_group(self, val: bool) -> Self
Builder function that sets the GroupPermissionSetting require_system_group.
Whether the setting can only be set to a system user group.
Sourcepub const fn allow_internet_group(&self) -> Option<bool>
pub const fn allow_internet_group(&self) -> Option<bool>
Gets the GroupPermissionSetting allow_internet_group.
Whether the setting can be set to role:internet system group.
Sourcepub fn set_allow_internet_group(&mut self, val: bool)
pub fn set_allow_internet_group(&mut self, val: bool)
Sets the GroupPermissionSetting allow_internet_group.
Whether the setting can be set to role:internet system group.
Sourcepub fn unset_allow_internet_group(&mut self) -> Option<bool>
pub fn unset_allow_internet_group(&mut self) -> Option<bool>
Unsets the GroupPermissionSetting allow_internet_group.
Whether the setting can be set to role:internet system group.
Sourcepub fn with_allow_internet_group(self, val: bool) -> Self
pub fn with_allow_internet_group(self, val: bool) -> Self
Builder function that sets the GroupPermissionSetting allow_internet_group.
Whether the setting can be set to role:internet system group.
Sourcepub const fn allow_nobody_group(&self) -> Option<bool>
pub const fn allow_nobody_group(&self) -> Option<bool>
Gets the GroupPermissionSetting allow_nobody_group.
Whether the setting can be set to role:nobody system group.
Sourcepub fn set_allow_nobody_group(&mut self, val: bool)
pub fn set_allow_nobody_group(&mut self, val: bool)
Sets the GroupPermissionSetting allow_nobody_group.
Whether the setting can be set to role:nobody system group.
Sourcepub fn unset_allow_nobody_group(&mut self) -> Option<bool>
pub fn unset_allow_nobody_group(&mut self) -> Option<bool>
Unsets the GroupPermissionSetting allow_nobody_group.
Whether the setting can be set to role:nobody system group.
Sourcepub fn with_allow_nobody_group(self, val: bool) -> Self
pub fn with_allow_nobody_group(self, val: bool) -> Self
Builder function that sets the GroupPermissionSetting allow_nobody_group.
Whether the setting can be set to role:nobody system group.
Sourcepub const fn allow_everyone_group(&self) -> Option<bool>
pub const fn allow_everyone_group(&self) -> Option<bool>
Gets the GroupPermissionSetting allow_everyone_group.
Whether the setting can be set to role:everyone system group.
If false, guest users cannot exercise this permission even if they are part of the group-setting value for this setting.
Sourcepub fn set_allow_everyone_group(&mut self, val: bool)
pub fn set_allow_everyone_group(&mut self, val: bool)
Sets the GroupPermissionSetting allow_everyone_group.
Whether the setting can be set to role:everyone system group.
If false, guest users cannot exercise this permission even if they are part of the group-setting value for this setting.
Sourcepub fn unset_allow_everyone_group(&mut self) -> Option<bool>
pub fn unset_allow_everyone_group(&mut self) -> Option<bool>
Unsets the GroupPermissionSetting allow_everyone_group.
Whether the setting can be set to role:everyone system group.
If false, guest users cannot exercise this permission even if they are part of the group-setting value for this setting.
Sourcepub fn with_allow_everyone_group(self, val: bool) -> Self
pub fn with_allow_everyone_group(self, val: bool) -> Self
Builder function that sets the GroupPermissionSetting allow_everyone_group.
Whether the setting can be set to role:everyone system group.
If false, guest users cannot exercise this permission even if they are part of the group-setting value for this setting.
Source§impl GroupPermissionSetting
impl GroupPermissionSetting
Sourcepub fn default_group_name(&self) -> Option<&str>
pub fn default_group_name(&self) -> Option<&str>
Gets the GroupPermissionSetting default_group_name.
Name of the default system group for the setting.
For some channel settings, this can also be channel_creator.
In that case:
-
If the channel’s
creator_idis notnull, default for the setting is an anonymous group with the channel creator as the only member. -
If the channel’s
creator_idisnull, default for the setting isrole:nobodysystem group.
Changes: In Zulip 12.0 (feature level 427), renamed stream_creator_or_nobody value to channel_creator.
Sourcepub fn set_default_group_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_default_group_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the GroupPermissionSetting default_group_name.
Name of the default system group for the setting.
For some channel settings, this can also be channel_creator.
In that case:
-
If the channel’s
creator_idis notnull, default for the setting is an anonymous group with the channel creator as the only member. -
If the channel’s
creator_idisnull, default for the setting isrole:nobodysystem group.
Changes: In Zulip 12.0 (feature level 427), renamed stream_creator_or_nobody value to channel_creator.
Sourcepub fn unset_default_group_name(&mut self) -> Option<String>
pub fn unset_default_group_name(&mut self) -> Option<String>
Unsets the GroupPermissionSetting default_group_name.
Name of the default system group for the setting.
For some channel settings, this can also be channel_creator.
In that case:
-
If the channel’s
creator_idis notnull, default for the setting is an anonymous group with the channel creator as the only member. -
If the channel’s
creator_idisnull, default for the setting isrole:nobodysystem group.
Changes: In Zulip 12.0 (feature level 427), renamed stream_creator_or_nobody value to channel_creator.
Sourcepub fn with_default_group_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_default_group_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the GroupPermissionSetting default_group_name.
Name of the default system group for the setting.
For some channel settings, this can also be channel_creator.
In that case:
-
If the channel’s
creator_idis notnull, default for the setting is an anonymous group with the channel creator as the only member. -
If the channel’s
creator_idisnull, default for the setting isrole:nobodysystem group.
Changes: In Zulip 12.0 (feature level 427), renamed stream_creator_or_nobody value to channel_creator.
Sourcepub fn default_for_system_groups(&self) -> Option<&str>
pub fn default_for_system_groups(&self) -> Option<&str>
Gets the GroupPermissionSetting default_for_system_groups.
Name of the default group for the setting for system groups. This is non-null only for group-level settings.
Sourcepub fn set_default_for_system_groups<'a, C: Into<Cow<'a, str>>>(
&mut self,
val: C,
)
pub fn set_default_for_system_groups<'a, C: Into<Cow<'a, str>>>( &mut self, val: C, )
Sets the GroupPermissionSetting default_for_system_groups.
Name of the default group for the setting for system groups. This is non-null only for group-level settings.
Sourcepub fn unset_default_for_system_groups(&mut self) -> Option<String>
pub fn unset_default_for_system_groups(&mut self) -> Option<String>
Unsets the GroupPermissionSetting default_for_system_groups.
Name of the default group for the setting for system groups. This is non-null only for group-level settings.
Sourcepub fn with_default_for_system_groups<'a, C: Into<Cow<'a, str>>>(
self,
val: C,
) -> Self
pub fn with_default_for_system_groups<'a, C: Into<Cow<'a, str>>>( self, val: C, ) -> Self
Builder function that sets the GroupPermissionSetting default_for_system_groups.
Name of the default group for the setting for system groups. This is non-null only for group-level settings.
Sourcepub fn allowed_system_groups(&self) -> Option<&[String]>
pub fn allowed_system_groups(&self) -> Option<&[String]>
Gets the GroupPermissionSetting allowed_system_groups.
An array of names of system groups to which the setting can be set to.
If the list is empty, the setting can be set to system groups based on the other boolean fields.
Changes: New in Zulip 8.0 (feature level 225).
Sourcepub fn set_allowed_system_groups<'a, C: Into<Cow<'a, [String]>>>(
&mut self,
val: C,
)
pub fn set_allowed_system_groups<'a, C: Into<Cow<'a, [String]>>>( &mut self, val: C, )
Sets the GroupPermissionSetting allowed_system_groups.
An array of names of system groups to which the setting can be set to.
If the list is empty, the setting can be set to system groups based on the other boolean fields.
Changes: New in Zulip 8.0 (feature level 225).
Sourcepub fn unset_allowed_system_groups(&mut self) -> Option<Vec<String>>
pub fn unset_allowed_system_groups(&mut self) -> Option<Vec<String>>
Unsets the GroupPermissionSetting allowed_system_groups.
An array of names of system groups to which the setting can be set to.
If the list is empty, the setting can be set to system groups based on the other boolean fields.
Changes: New in Zulip 8.0 (feature level 225).
Sourcepub fn with_allowed_system_groups<'a, C: Into<Cow<'a, [String]>>>(
self,
val: C,
) -> Self
pub fn with_allowed_system_groups<'a, C: Into<Cow<'a, [String]>>>( self, val: C, ) -> Self
Builder function that sets the GroupPermissionSetting allowed_system_groups.
An array of names of system groups to which the setting can be set to.
If the list is empty, the setting can be set to system groups based on the other boolean fields.
Changes: New in Zulip 8.0 (feature level 225).