mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
settings: Clean schemas and types used for group settings.
Removed "type"/"Type" from schema and type names used for group settings because we want to use "type"/"Type" only for "type of a type" cases. So, this commit renames- - anonymous_group_type => anonymous_group_schema - group_setting_type_schema => group_setting_value_schema - GroupSettingType => GroupSettingValue We also had duplicate definitions for GroupSettingType, in state_data.ts and in settings_components.ts. So, removed it from settings_components.ts.
This commit is contained in:
@@ -9,7 +9,7 @@ import {page_params} from "./page_params";
|
||||
import * as settings_config from "./settings_config";
|
||||
import type {
|
||||
GroupPermissionSetting,
|
||||
GroupSettingType,
|
||||
GroupSettingValue,
|
||||
StateData,
|
||||
user_group_schema,
|
||||
} from "./state_data";
|
||||
@@ -325,7 +325,7 @@ export function is_user_in_group(user_group_id: number, user_id: number): boolea
|
||||
}
|
||||
|
||||
export function is_user_in_setting_group(
|
||||
setting_group: GroupSettingType,
|
||||
setting_group: GroupSettingValue,
|
||||
user_id: number,
|
||||
): boolean {
|
||||
if (typeof setting_group === "number") {
|
||||
|
||||
Reference in New Issue
Block a user