public static MvcHtmlString AccessUser(this MvcHtmlString value, Constants.Constants.UserType userType)
 {
     if (userType < Constants.Constants.UserType.User)
     {
         return(MvcHtmlString.Empty);
     }
     return(value);
 }
 public static MvcHtmlString AccessAdmin(this MvcHtmlString value, Constants.Constants.UserType userType)
 {
     if (userType != Constants.Constants.UserType.Admin)
     {
         return(MvcHtmlString.Empty);
     }
     return(value);
 }
Example #3
0
 public SubMenuButton(string name, string type, string title, Constants.Constants.UserType access = Constants.Constants.UserType.Guest) : base(name, title, access)
 {
 }
Example #4
0
 public SubMenuLink(string name, string url, string title, Constants.Constants.UserType access = Constants.Constants.UserType.Guest) : base(name, title, access)
 {
     Url = url;
 }
Example #5
0
 protected SubMenuItem(string name, string title, Constants.Constants.UserType access = Constants.Constants.UserType.Guest)
 {
     Name       = name;
     Title      = title;
     AccessRole = access;
 }
 public AuthAttribute()
 {
     SdRole = Constants.Constants.UserType.Guest;
 }