示例#1
0
        public static bool IsSalesDirector(this UserDetailsModel user)
        {
            var privileges = new string[] { "MNGALLSLSTMS" };

            return(user.UserPrivileges.Any(a => privileges != null && privileges.Any(b => b == a)) &&
                   !user.Roles.Contains("BusinessAdmin"));
        }
示例#2
0
 public static bool HasAllAccountReadPrivilage(this UserDetailsModel user)
 {
     return(user.UserPrivileges.Contains("RDACNTALL"));
 }
示例#3
0
 public static bool HasAllLeadReadPrivilage(this UserDetailsModel user)
 {
     return(user.UserPrivileges.Contains("RDLDALL"));
 }
示例#4
0
 public static bool IsSalesRep(this UserDetailsModel user)
 {
     return(user.IsRep);
 }
示例#5
0
 public static bool IsSalesManager(this UserDetailsModel user)
 {
     return(user.IsSalesManager && !user.IsBuzAdmin());
 }
示例#6
0
 public static bool IsBuzAdmin(this UserDetailsModel user)
 {
     return(user.Roles.Contains("BusinessAdmin"));
 }