public static bool HasPermisson(this WebViewPage view) { var controller = view.ViewContext.RouteData.Values["controller"].ToString(); var action = view.ViewContext.RouteData.Values["action"].ToString(); return(FunctionsService.Authorize(controller, action, view.GetNhaThuoc(false))); }
public static bool HasPermisson(this WebViewPage view, string controller, string action) { return(FunctionsService.Authorize(controller.ToLower(), action.ToLower(), view.GetNhaThuoc(false))); }