From f386e4f91b2e98251e4f78562c0c5ec4c43621c1 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 20 Jun 2023 22:10:23 +0000 Subject: [PATCH] update --- Controller/BackendController.php | 3 +++ Models/PermissionCategory.php | 16 +++++++++++++++- Theme/Backend/kanban-board-create.tpl.php | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 5b8a9ec..50dd6c0 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -194,6 +194,9 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-board-create'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response); + $permissionView = new \Modules\Admin\Theme\Backend\Components\AccountPermissionSelector\BaseView($this->app->l11nManager, $request, $response); + $view->data['permissionView'] = $permissionView; + return $view; } diff --git a/Models/PermissionCategory.php b/Models/PermissionCategory.php index 6336fa4..b46f18a 100755 --- a/Models/PermissionCategory.php +++ b/Models/PermissionCategory.php @@ -30,5 +30,19 @@ abstract class PermissionCategory extends Enum public const CARD = 2; - public const KANBAN = 3; + public const COMMENT = 3; + + public const KANBAN = 4; + + public const D_CREATE = [ + self::BOARD => [ + 'DEFAULT' => ['RUDP'], // limited by own permissions + 'MAX' => ['RUDP'] // limited by own permissions + ], + + self::CARD => [ + 'DEFAULT' => ['RU'], // limited by own permissions + 'MAX' => ['RUD'] // limited by own permissions + ], + ]; } diff --git a/Theme/Backend/kanban-board-create.tpl.php b/Theme/Backend/kanban-board-create.tpl.php index f3521f2..329fa51 100755 --- a/Theme/Backend/kanban-board-create.tpl.php +++ b/Theme/Backend/kanban-board-create.tpl.php @@ -40,3 +40,5 @@ echo $this->data['nav']->render(); + +data['permissionView']->render('board_permission'); ?> \ No newline at end of file