Initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
@inject IUserContextAccessor UserContext
|
||||
@using SharepointToolbox.Web.Core.Models
|
||||
@using SharepointToolbox.Web.Services.Session
|
||||
|
||||
@* Wrap write-only UI. TechN0 sees the ReadOnlyContent fallback. *@
|
||||
|
||||
@if (UserContext.Role >= UserRole.TechN1)
|
||||
{
|
||||
@ChildContent
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (ReadOnlyContent is not null)
|
||||
{
|
||||
@ReadOnlyContent
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="alert alert-info">
|
||||
You have <strong>read-only</strong> access (Tech-N0). Contact an Admin to request write access.
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter] public RenderFragment? ChildContent { get; set; }
|
||||
[Parameter] public RenderFragment? ReadOnlyContent { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user