Esempio n. 1
0
        /// <summary>TBD</summary>
        /// <returns>TBD</returns>
        public static bool IsSalesCoordinator()
        {
            return(ApolloApp.Instance.IsSalesCoordinator);

            //Twiggy, Elaine, Stephanie Schneider
            if (IsSupportUser() || IsAdminUser())
            {
                return(true);
            }
            if (String.Compare(GetCurrentUserId, "ttovar", false) == 0)
            {
                return(true);
            }
            if (String.Compare(GetCurrentUserId, "edyjak", false) == 0)
            {
                return(true);
            }
            if (String.Compare(GetCurrentUserId, "sschneider", false) == 0)
            {
                return(true);
            }
            string groupName = ConfigurationManager.AppSettings["salesCoordinatorsGroup"];

            return(TitanADService.CheckRoleForUser(GetCurrentUserId, groupName));
        }
Esempio n. 2
0
        /// <summary>Determines if the current user is in the Corporate user group.</summary>
        /// <returns>True if the user is an Admin/False otherwise</returns>
        public static bool IsCollectionsUser()
        {
            return(ApolloApp.Instance.IsCollectionsUser);

            if (IsSupportUser() || IsAdminUser())
            {
                return(true);
            }
            string groupName = ConfigurationManager.AppSettings["collectionsUserGroup"];

            return(TitanADService.CheckRoleForUser(GetCurrentUserId, groupName));
        }
Esempio n. 3
0
        /// <summary>TBD</summary>
        /// <returns>TBD</returns>
        public static bool IsMarketingUser()
        {
            return(ApolloApp.Instance.IsMarketingUser);

            if (IsSupportUser() || IsAdminUser() || IsDigitalUser())
            {
                return(true);
            }
            string groupName = ConfigurationManager.AppSettings["marketingGroup"];

            return(TitanADService.CheckRoleForUser("TNSMITH", groupName));//WebCommon.GetCurrentUserId, groupName);
        }
Esempio n. 4
0
        /// <summary>TBD</summary>
        /// <returns>TBD</returns>
        public static bool IsDigitalAvailsPhiladelphiaUser()
        {
            return(ApolloApp.Instance.IsDigitalAvailsPhiladelphiaUser);

            if (IsSupportUser() || IsAdminUser())
            {
                return(true);
            }
            string groupName = ConfigurationManager.AppSettings["digitalAvailsPhiladelphiaGroup"];

            return(TitanADService.CheckRoleForUser(GetCurrentUserId, groupName));
        }
Esempio n. 5
0
        public bool IsUserInRole(string roleName)
        {
            object isUserInRole = WebCommon.GetSessionValue(string.Format("is{0}User", roleName), null);

            if (isUserInRole == null)
            {
                isUserInRole = TitanADService.CheckRoleForUser(Security.GetCurrentUserId, roleName);
                WebCommon.SetSessionState(string.Format("is{0}User", roleName), isUserInRole);
                return((bool)isUserInRole);
            }
            else
            {
                return((bool)isUserInRole);
            }
        }
Esempio n. 6
0
 /// <summary>TBD</summary>
 /// <param name="id">TBD</param>
 /// <returns>TBD</returns>
 public static string GetUserEmailFromId(string id)
 {
     return(TitanADService.GetADProperty(id, TitanADService.ADProperties.UserEmail));
 }
Esempio n. 7
0
 /// <summary>TBD</summary>
 /// <param name="id">TBD</param>
 /// <returns>TBD</returns>
 public static string GetFullUserNameFromId(string id)
 {
     return(TitanADService.GetADProperty(id, TitanADService.ADProperties.UserFullName));
 }