From 4089ba01e0881c89a72332e13bc3a80b6bddec2a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 29 Jun 2026 22:15:55 +0000
Subject: [PATCH] =DashboardManager overhaul. A bit easier to modify the output of pages. Still have to get the account pages to work as expected, as well as verify the integrations and others are working - but registrar/content pages work as expected. Also fixed up the table generation in CRUD.js and CRUDSkeleton.php

---
 inc/managers/Dashboard/Section.php |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/inc/managers/Dashboard/Section.php b/inc/managers/Dashboard/Section.php
index 4df5287..95560ba 100644
--- a/inc/managers/Dashboard/Section.php
+++ b/inc/managers/Dashboard/Section.php
@@ -12,12 +12,13 @@
 	protected string $icon = '';
 	protected int $order = 0;
 	protected bool $isLink = false;
+	protected ?string $permission = null;
 
 	public function __construct(string $title, ?string $slug = null, string $icon = '', ?string $parent = null) {
 		$this->title = $title;
 		$this->slug = is_null($slug) ? DashboardPage::sanitizeString($title) : DashboardPage::sanitizeString($slug);
 		$this->icon = $icon;
-		$this->parent = $parent;
+		$this->parent = is_null($parent) ? $parent : DashboardPage::sanitizeString($parent);
 	}
 
 	public function getTitle():string
@@ -52,4 +53,13 @@
 	{
 		return $this->isLink;
 	}
+
+	public function setPermission(string $permission):void
+	{
+		$this->permission = $permission;
+	}
+	public function getPermission():?string
+	{
+		return $this->permission;
+	}
 }

--
Gitblit v1.10.0