Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 2s
67 lines
2.5 KiB
TypeScript
67 lines
2.5 KiB
TypeScript
import { Accordion, AccordionItem, Box, Callout, FieldGroup } from '@rocket.chat/fuselage';
|
|
import { ExternalLink } from '@rocket.chat/ui-client';
|
|
import { useSetting } from '@rocket.chat/ui-contexts';
|
|
import { useTranslation, Trans } from 'react-i18next';
|
|
|
|
import AbacEnabledToggle from './AbacEnabledToggle';
|
|
import SettingField from './SettingField';
|
|
import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule';
|
|
import { links } from '../../../../lib/links';
|
|
|
|
const SettingsPage = () => {
|
|
const { t } = useTranslation();
|
|
const { data: hasABAC = false } = useHasLicenseModule('abac');
|
|
const pdpType = useSetting('ABAC_PDP_Type', 'local');
|
|
|
|
return (
|
|
<Box maxWidth='x600' width='full' alignSelf='center' overflow='auto' marginBlock={24}>
|
|
<FieldGroup>
|
|
<AbacEnabledToggle hasABAC={hasABAC} />
|
|
<SettingField settingId='ABAC_PDP_Type' />
|
|
{pdpType !== 'local' && <SettingField settingId='ABAC_Attribute_Store' />}
|
|
<SettingField settingId='ABAC_ShowAttributesInRooms' />
|
|
<SettingField settingId='Abac_Cache_Decision_Time_Seconds' />
|
|
|
|
{pdpType === 'local' && (
|
|
<Callout>
|
|
<Trans i18nKey='ABAC_Enabled_callout'>
|
|
User attributes are synchronized via LDAP
|
|
<ExternalLink to={links.go.abacLDAPDocs}>Learn more</ExternalLink>
|
|
</Trans>
|
|
</Callout>
|
|
)}
|
|
|
|
<Accordion>
|
|
<AccordionItem title={t('ABAC_Classification_Banners')}>
|
|
<FieldGroup>
|
|
<SettingField settingId='ABAC_Classification_Banners_Enabled' />
|
|
<SettingField settingId='ABAC_Classification_Banners_Config' />
|
|
</FieldGroup>
|
|
</AccordionItem>
|
|
|
|
<AccordionItem title={t('LDAP_DataSync_ABAC')}>
|
|
<FieldGroup>
|
|
<SettingField settingId='LDAP_Background_Sync_ABAC_Attributes' />
|
|
<SettingField settingId='LDAP_Background_Sync_ABAC_Attributes_Interval' />
|
|
<SettingField settingId='LDAP_ABAC_AttributeMap' />
|
|
</FieldGroup>
|
|
</AccordionItem>
|
|
|
|
<AccordionItem title={t('ABAC_Virtru_PDP_Configuration')}>
|
|
<SettingField settingId='ABAC_Virtru_Base_URL' />
|
|
<SettingField settingId='ABAC_Virtru_Client_ID' />
|
|
<SettingField settingId='ABAC_Virtru_Client_Secret' />
|
|
<SettingField settingId='ABAC_Virtru_OIDC_Endpoint' />
|
|
<SettingField settingId='ABAC_Virtru_Default_Entity_Key' />
|
|
<SettingField settingId='ABAC_Virtru_Attribute_Namespace' />
|
|
<SettingField settingId='ABAC_Virtru_Sync_Interval' />
|
|
<SettingField settingId='ABAC_Virtru_Test_Connection' />
|
|
</AccordionItem>
|
|
</Accordion>
|
|
</FieldGroup>
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default SettingsPage;
|