signal-desktop/ts/groups/util.ts
2022-03-14 18:32:07 -07:00

15 lines
391 B
TypeScript

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { SignalService as Proto } from '../protobuf';
const ACCESS_ENUM = Proto.AccessControl.AccessRequired;
export function isAccessControlEnabled(
accessControl: number | undefined
): boolean {
return (
accessControl === ACCESS_ENUM.ANY ||
accessControl === ACCESS_ENUM.ADMINISTRATOR
);
}