Client fixes
Client is partially done. 227 warnings left out of 1500 I like Rider
This commit is contained in:
@ -2,15 +2,15 @@
|
||||
@inherits ModuleBase
|
||||
@inject IUserService UserService
|
||||
|
||||
@if (authorized)
|
||||
@if (_authorized)
|
||||
{
|
||||
if (Disabled)
|
||||
{
|
||||
<NavLink class="@classname" href="@url" style="@style" disabled>@text</NavLink>
|
||||
<NavLink class="@_classname" href="@_url" style="@_style" disabled>@_text</NavLink>
|
||||
}
|
||||
else
|
||||
{
|
||||
<NavLink class="@classname" href="@url" style="@style">@text</NavLink>
|
||||
<NavLink class="@_classname" href="@_url" style="@_style">@_text</NavLink>
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,50 +39,50 @@
|
||||
[Parameter]
|
||||
public string EditMode { get; set; } // optional - specifies if a user must be in edit mode to see the action - default is true
|
||||
|
||||
string text = "";
|
||||
string url = "";
|
||||
string parameters = "";
|
||||
string classname = "btn btn-primary";
|
||||
string style = "";
|
||||
bool editmode = true;
|
||||
bool authorized = false;
|
||||
string _text = "";
|
||||
string _url = "";
|
||||
string _parameters = "";
|
||||
string _classname = "btn btn-primary";
|
||||
string _style = "";
|
||||
bool _editmode = true;
|
||||
bool _authorized = false;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
text = Action;
|
||||
_text = Action;
|
||||
if (!string.IsNullOrEmpty(Text))
|
||||
{
|
||||
text = Text;
|
||||
_text = Text;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Parameters))
|
||||
{
|
||||
parameters = Parameters;
|
||||
_parameters = Parameters;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Class))
|
||||
{
|
||||
classname = Class;
|
||||
_classname = Class;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Style))
|
||||
{
|
||||
style = Style;
|
||||
_style = Style;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(EditMode))
|
||||
{
|
||||
editmode = bool.Parse(EditMode);
|
||||
_editmode = bool.Parse(EditMode);
|
||||
}
|
||||
|
||||
url = EditUrl(Action, parameters);
|
||||
authorized = IsAuthorized();
|
||||
_url = EditUrl(Action, _parameters);
|
||||
_authorized = IsAuthorized();
|
||||
}
|
||||
|
||||
private bool IsAuthorized()
|
||||
{
|
||||
bool authorized = false;
|
||||
if (PageState.EditMode || !editmode)
|
||||
if (PageState.EditMode || !_editmode)
|
||||
{
|
||||
SecurityAccessLevel security = SecurityAccessLevel.Host;
|
||||
if (Security == null)
|
||||
|
Reference in New Issue
Block a user