Esempio n. 1
0
        public static void CheckPrivilege(Privilege privilege)
        {
            ManagerInfo manager = HiContext.Current.Manager;

            if (manager == null)
            {
                HttpContext.Current.Response.Redirect(Globals.GetAdminAbsolutePath("/accessDenied?privilege=" + privilege.ToString()));
            }
            else if (manager.RoleId != 0 && manager.RoleId != -1 && manager.RoleId != -3 && manager.RoleId != -2 && !ManagerHelper.HasPrivilege((int)privilege, manager))
            {
                HttpContext.Current.Response.Redirect(Globals.GetAdminAbsolutePath("/accessDenied?privilege=" + privilege.ToString()));
            }
        }
 public static bool Delete(int ServiceId)
 {
     ManagerHelper.CheckPrivilege(Privilege.SiteSettings);
     return(new OnlineServiceDao().Delete <OnlineServiceInfo>(ServiceId));
 }