예제 #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"));
 }