mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-19 17:52:45 +02:00
Follows up on https://github.com/Unleash/unleash/pull/4853 to add Biome to the frontend as well.  Added a few `biome-ignore` to speed up the process but we may want to check and fix them in the future.
23 lines
751 B
TypeScript
23 lines
751 B
TypeScript
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
|
import { PermissionGuard } from 'component/common/PermissionGuard/PermissionGuard';
|
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
|
import { PremiumFeature } from 'component/common/PremiumFeature/PremiumFeature';
|
|
import { READ_ROLE } from '@server/types/permissions';
|
|
import { RolesPage } from './RolesPage';
|
|
|
|
export const Roles = () => {
|
|
const { isEnterprise } = useUiConfig();
|
|
|
|
if (!isEnterprise()) {
|
|
return <PremiumFeature feature='project-roles' page />;
|
|
}
|
|
|
|
return (
|
|
<div>
|
|
<PermissionGuard permissions={[READ_ROLE, ADMIN]}>
|
|
<RolesPage />
|
|
</PermissionGuard>
|
|
</div>
|
|
);
|
|
};
|