feat(web): use new manage permission in checks

This commit is contained in:
Ali BARIN
2025-04-01 13:56:28 +00:00
parent f4c7ca3e7f
commit 8b1ed54d54
6 changed files with 13 additions and 13 deletions

View File

@@ -93,15 +93,15 @@ function SettingsLayout() {
const closeDrawer = () => setDrawerOpen(false);
const drawerLinks = createDrawerLinks({
canCreateFlows: currentUserAbility.can('create', 'Flow'),
canCreateFlows: currentUserAbility.can('manage', 'Flow'),
canReadUser: currentUserAbility.can('read', 'User'),
canReadRole: currentUserAbility.can('read', 'Role'),
canUpdateConfig: currentUserAbility.can('update', 'Config'),
canManageSamlAuthProvider:
currentUserAbility.can('read', 'SamlAuthProvider') &&
currentUserAbility.can('update', 'SamlAuthProvider') &&
currentUserAbility.can('create', 'SamlAuthProvider'),
canUpdateApp: currentUserAbility.can('update', 'App'),
canUpdateConfig: currentUserAbility.can('manage', 'Config'),
canManageSamlAuthProvider: currentUserAbility.can(
'manage',
'SamlAuthProvider',
),
canUpdateApp: currentUserAbility.can('manage', 'App'),
});
const drawerBottomLinks = [

View File

@@ -19,7 +19,7 @@ export default function FlowsButtons() {
const theme = useTheme();
const { data: config } = useAutomatischConfig();
const matchSmallScreens = useMediaQuery(theme.breakpoints.down('md'));
const canCreateFlow = currentUserAbility.can('create', 'Flow');
const canCreateFlow = currentUserAbility.can('manage', 'Flow');
const enableTemplates = config?.data.enableTemplates === true;
const createFlowButtonData = {