notification service and user management improvements

This commit is contained in:
Shaun Walker
2020-02-03 16:43:37 -05:00
parent d8d5e768b2
commit 0aed11e71c
50 changed files with 2077 additions and 284 deletions

View File

@ -50,10 +50,14 @@
[Parameter]
public string Class { get; set; } // optional
[Parameter]
public string EditMode { get; set; } // optional - specifies if a user must be in edit mode to see the action - default is true
[Parameter]
public Action OnClick { get; set; } // required if an Action is specified - executes a method in the calling component
bool visible = false;
bool editmode = true;
bool authorized = false;
protected override void OnParametersSet()
@ -66,13 +70,17 @@
{
Class = "btn btn-success";
}
if (!string.IsNullOrEmpty(EditMode))
{
editmode = bool.Parse(EditMode);
}
authorized = IsAuthorized();
}
private bool IsAuthorized()
{
bool authorized = false;
if (PageState.EditMode)
if (PageState.EditMode || !editmode)
{
SecurityAccessLevel security = SecurityAccessLevel.Host;
if (Security == null)