Enhance tab authorization with role and permission checks #5872

Add RoleName and PermissionName parameters to TabPanel for fine-grained tab visibility control. Update IsAuthorized logic in TabStrip to prioritize Host/Admin access, then check SecurityAccessLevel, and additionally require specified roles or permissions if provided. Removes redundant Admin/Host checks from the switch statement for clarity.
This commit is contained in:
Leigh Pointer
2025-12-13 18:13:37 +01:00
parent 171314947c
commit 01ad99b925
2 changed files with 39 additions and 7 deletions

View File

@ -30,6 +30,12 @@ else
[Parameter]
public SecurityAccessLevel? Security { get; set; } // optional - can be used to specify SecurityAccessLevel
[Parameter]
public string RoleName { get; set; } // optional - can be used to specify Role allowed to view this tab
[Parameter]
public string PermissionName { get; set; } // optional - can be used to specify Permission allowed to view this tab
protected override void OnParametersSet()
{
base.OnParametersSet();