public override void SetAccess(FormM form, DFDictionary entity) { if (!AuthLoader.CheckFunctionAccess("代理申请", Util.GetCurrentUser().UserId)) { form.GetControlM("btnProxyRequest").Visible = false; } base.SetAccess(form, entity); }
public override void SetAccess(FormM form, DFDictionary entity) { base.SetAccess(form, entity); // 检查按钮权限 form.GetControlM("btnDelete").Visible = false; form.GetControlM("btnCancelWorkflow").Visible = false; var user = Util.GetCurrentUser(); if (AuthLoader.CheckFunctionAccess("WFCore_AllWF.btnDelete", user.UserId)) { form.GetControlM("btnDelete").Visible = true; } if (AuthLoader.CheckFunctionAccess("WFCore_AllWF.btnCancelWorkflow", user.UserId)) { form.GetControlM("btnCancelWorkflow").Visible = true; } }