UNPKG

@datalayer/core

Version:

[![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)

51 lines (50 loc) 2.01 kB
/* * Copyright (c) 2023-2025 Datalayer, Inc. * Distributed under the terms of the Modified BSD License. */ import { AlienIcon } from '@datalayer/icons-react'; const ORGANIZATION_MEMBER_PERMSSIONS = ['invite_users']; const ORGANIZATION_SECURITY_AUDITOR_PERMSSIONS = ['view_landings']; const ORGANIZATION_USAGE_REVIEWER_PERMSSIONS = ['view_users']; const ORGANIZATION_ADMIN_PERMSSIONS = ORGANIZATION_MEMBER_PERMSSIONS.concat(...['manage_users']); export class OrganizationRoles { constructor() { } static Member = { id: 'organization_member', handle: 'organization_member', displayName: 'Organization Member', description: 'A Organization Member is the role given to any member of the organization.', permissions: ORGANIZATION_MEMBER_PERMSSIONS, icon: AlienIcon, }; static SecurityAuditor = { id: 'organization_security_auditor', handle: 'organization_security_auditor', displayName: 'Organization Security Auditor', description: 'A Organization Security Auditor is given to ...', permissions: ORGANIZATION_SECURITY_AUDITOR_PERMSSIONS, icon: AlienIcon, }; static UsageReviewer = { id: 'organization_usage_reviewer', handle: 'organization_usage_reviewer', displayName: 'Organization Usage Reviewer', description: 'A Organization Usage Reviewer can review the platform usage.', permissions: ORGANIZATION_USAGE_REVIEWER_PERMSSIONS, icon: AlienIcon, }; static Owner = { id: 'organization_owner', handle: 'organization_owner', displayName: 'Organization Owner', description: 'A Organization Owner is the owner of the organization.', permissions: ORGANIZATION_ADMIN_PERMSSIONS, icon: AlienIcon, }; static ALL_ROLES = [ OrganizationRoles.Member, OrganizationRoles.Owner, OrganizationRoles.SecurityAuditor, OrganizationRoles.UsageReviewer, ]; }