/// <summary> /// Load settings /// </summary> protected override void LoadSettings() { // Verify that the current user has access to view this module if (PortalSecurity.HasViewPermissions(ModuleID) == false) { // Removed by Mario Endara <*****@*****.**> (2004/11/04) // && PortalSecurity.IsInRoles("Admins") == false) PortalSecurity.AccessDenied(); } base.LoadSettings(); }
public override void OnActionExecuting(ActionExecutingContext filterContext) { // This method is executed before calling the action // and here you have access to the route data: var mID = (int)filterContext.ActionParameters["mID"]; if (!PortalSecurity.HasViewPermissions(mID)) { PortalSecurity.AccessDenied(); filterContext.Result = new EmptyResult(); } else { base.OnActionExecuting(filterContext); } }
public ActionResult Module() { SetModuleId(); if (PortalSecurity.HasViewPermissions(ModuleId)) { var model = new FileManagerModel { PortalName = PortalSettings.PortalFullPath, ModuleId = ModuleId, ViewPermission = PortalSecurity.HasViewPermissions(ModuleId), EditPermission = PortalSecurity.HasEditPermissions(ModuleId) }; return(View(model)); } PortalSecurity.AccessDenied(); return(new EmptyResult()); }