user role client : give access to panel account

This commit is contained in:
isUnknown 2025-01-27 18:22:03 +01:00
parent 8ff30c7f34
commit bcaf287235
7 changed files with 84 additions and 84 deletions

View file

@ -1,11 +0,0 @@
title: Client
description: Ne peut pas accéder au Panel, peut accéder aux Projets auxquels il est assigné côté front.
permissions:
access:
panel: false
fields:
projects:
label: Projets
type: pages
query: page('projects').children

View file

@ -1,21 +0,0 @@
title: Interne Pochet
description: Peux accéder au Panel mais pas aux Utilisateurs, peut accéder aux Projets auxquels il est assigné par un Admin.
home: /panel/pages/projects
permissions:
access:
users: false
fields:
job:
label: Métier
type: select
options:
- Project Manager
- Sales Manager
default: Project Panager
width: 1/4
projects:
label: Projets
type: pages
query: page('projects').children
width: 3/4

View file

@ -2,7 +2,22 @@ title: Client
description: Ne peut pas accéder au Panel, peut accéder aux Projets auxquels il est assigné côté front.
permissions:
access:
panel: false
*: false
panel: true
account: true
projects: false
clients: false
design-to-light: false
inspirations: false
materials: false
creations: false
pages: false
options:
update:
client: false
changeRole: false
delete: false
fields:
client:

View file

@ -1,24 +1,15 @@
<?php
return [
// 'site' => [
// 'label' => 'Dashboard',
// 'icon' => 'dashboard',
// 'current' => function (string $current): bool {
// // the links of all your custom menu entries
// $links = [
// 'pages/clients',
// 'pages/projects',
// 'pages/inspirations',
// 'pages/notifications',
// 'pages/reunions'
// ];
// $path = Kirby\Cms\App::instance()->path();
// return
// $current === 'site' &&
// A::every($links, fn ($link) => Str::contains($path, $link) === false);
// }
// ],
$menu = [
'website' => [
"label" => "Ouvrir le site",
"icon" => "open",
"link" => "https://designtopack.morphozbygroupepochet.com",
'current' => function (string $current): bool {
return false;
}
],
"-",
'projects' => [
'label' => 'Projets',
'icon' => 'folder',
@ -76,16 +67,9 @@ return [
}
],
'-',
// 'reunions' => [
// 'label' => 'Réunions',
// 'icon' => 'calendar',
// 'link' => 'pages/reunions',
// 'current' => function (string $current): bool {
// $path = Kirby\Cms\App::instance()->path();
// return Str::contains($path, 'pages/reunions');
// }
// ],
'-',
'users',
'system'
];
];
return $menu;