1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
7 ResourceWithProperties,
13 export interface GroupResource extends TrashableResource, ResourceWithProperties {
14 kind: ResourceKind.GROUP;
16 groupClass: GroupClass | null;
19 ensure_unique_name: boolean;
22 export enum GroupClass {
28 export enum BuiltinGroups {
29 ALL = 'fffffffffffffff',
30 ANON = 'anonymouspublic',
31 SYSTEM = '000000000000000',
34 export const getBuiltinGroupUuid = (cluster: string, groupName: BuiltinGroups): string => {
35 return cluster ? `${cluster}-${ResourceObjectType.GROUP}-${groupName}` : "";
38 export const isBuiltinGroup = (uuid: string) => {
39 const match = RESOURCE_UUID_REGEX.exec(uuid);
40 const parts = match ? match[0].split('-') : [];
41 return parts.length === 3 && parts[1] === ResourceObjectType.GROUP && Object.values<string>(BuiltinGroups).includes(parts[2]);