29 lines
678 B
Plaintext
29 lines
678 B
Plaintext
@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; }
|
|
}
|