mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
settings_data: Check for invalid policy values.
This commit is contained in:
@@ -148,6 +148,11 @@ function user_has_permission(policy_value: number): boolean {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (policy_value !== settings_config.common_policy_values.by_full_members.code) {
|
||||||
|
throw new Error("Unexpected policy value.");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We know the user is a member, but need to check if they are a "Full member". */
|
||||||
const current_datetime = new Date();
|
const current_datetime = new Date();
|
||||||
const person_date_joined = new Date(user_join_date);
|
const person_date_joined = new Date(user_join_date);
|
||||||
const user_join_days =
|
const user_join_days =
|
||||||
|
|||||||
Reference in New Issue
Block a user