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;
18 ensure_unique_name: boolean;
21 // Optional local-only field, undefined for not loaded, null for failed to load
22 memberCount?: number | null;
25 export enum GroupClass {
31 export enum BuiltinGroups {
32 ALL = 'fffffffffffffff',
33 ANON = 'anonymouspublic',
34 SYSTEM = '000000000000000',
37 export const getBuiltinGroupUuid = (cluster: string, groupName: BuiltinGroups): string => {
38 return cluster ? `${cluster}-${ResourceObjectType.GROUP}-${groupName}` : "";
41 export const isBuiltinGroup = (uuid: string) => {
42 const match = RESOURCE_UUID_REGEX.exec(uuid);
43 const parts = match ? match[0].split('-') : [];
44 return parts.length === 3 && parts[1] === ResourceObjectType.GROUP && Object.values<string>(BuiltinGroups).includes(parts[2]);
47 export const selectedFieldsOfGroup = [