示例#1
0
        private void ApproveAuditsActionPermission(XpandRole userRole)
        {
            var actionStateRulePermission = ObjectSpace.CreateObject <ActionStateOperationPermissionData>();

            actionStateRulePermission.ObjectTypeData = typeof(object);
            actionStateRulePermission.ActionId       = AuditPendingController.ApproveAudits;
            actionStateRulePermission.ActionState    = ActionState.Hidden;
            actionStateRulePermission.ID             = "Hide ApproveAudits";
            userRole.Permissions.Add(actionStateRulePermission);
        }
 public IEnumerable <IOperationPermission> GetPermissions(XpandRole xpandRole)
 {
     return(true.Equals(xpandRole.GetMemberValue("ModifyLayout"))
                ? new[] { new OverallCustomizationAllowedPermission() }
                : Enumerable.Empty <IOperationPermission>());
 }