public NavigationNode(string action, string controller, string title, object allowedRole = null) : this() { Action = action; Controller = controller; Title = title; if (allowedRole != null) { AllowedRoles.Add(allowedRole); } }
public JsonSerialiseAttribute(params UserRole[] allowedRoles) { if (allowedRoles.Contains(UserRole.None)) { AllowedRoles = new List <UserRole>(); return; } AllowedRoles = allowedRoles.ToList(); if (!AllowedRoles.Contains(UserRole.Realogy)) { AllowedRoles.Add(UserRole.Realogy); } }