Exemplo n.º 1
0
        protected override bool IsRequestFit(T permissionRequest, OperationPermissionBase permission, IRequestSecurityStrategy securityInstance)
        {
            var isRequestFit = base.IsRequestFit(permissionRequest, permission, securityInstance);

            if (isRequestFit && permission is ConditionalLogicRulePermission)
            {
                var requestFit = permissionRequest.NormalCriteria == ((ConditionalLogicRulePermission)permission).NormalCriteria && permissionRequest.EmptyCriteria == ((ConditionalLogicRulePermission)permission).EmptyCriteria;
                return(requestFit);
            }
            return(false);
        }
Exemplo n.º 2
0
        protected override bool IsRequestFit(
            ActionExecutePermissionRequest permissionRequest, OperationPermissionBase permission,
            IRequestSecurityStrategy securityInstance)
        {
            ActionExecutePermission ActionExecutePermission = permission as ActionExecutePermission;

            if (permissionRequest == null || ActionExecutePermission == null)
            {
                return(false);
            }
            return(permissionRequest.Operation == ActionExecutePermission.Operation);
        }
Exemplo n.º 3
0
 protected override bool IsRequestFit(T permissionRequest, OperationPermissionBase permission, IRequestSecurityStrategy securityInstance)
 {
     if (permission is LogicRulePermission)
     {
         return(permissionRequest.ExecutionContextGroup == ((LogicRulePermission)permission).ExecutionContextGroup &&
                permissionRequest.FrameTemplateContextGroup == ((LogicRulePermission)permission).FrameTemplateContextGroup &&
                permissionRequest.ID == ((LogicRulePermission)permission).ID &&
                permissionRequest.Index == ((LogicRulePermission)permission).Index &&
                permissionRequest.IsRootView == ((LogicRulePermission)permission).IsRootView &&
                permissionRequest.Nesting == ((LogicRulePermission)permission).Nesting &&
                permissionRequest.ObjectType == ((LogicRulePermission)permission).ObjectType &&
                permissionRequest.ViewContextGroup == ((LogicRulePermission)permission).ViewContextGroup &&
                permissionRequest.ViewEditMode == ((LogicRulePermission)permission).ViewEditMode &&
                permissionRequest.ViewId == ((LogicRulePermission)permission).ViewId &&
                permissionRequest.ViewType == ((LogicRulePermission)permission).ViewType &&
                permissionRequest.FrameTemplateContext == ((LogicRulePermission)permission).FrameTemplateContext);
     }
     return(false);
 }
Exemplo n.º 4
0
        protected override bool IsRequestFit(AdditionalViewControlsPermissionRequest permissionRequest, OperationPermissionBase permission, IRequestSecurityStrategy securityInstance)
        {
            var isRequestFit = base.IsRequestFit(permissionRequest, permission, securityInstance);

            if (isRequestFit && permission is AdditionalViewControlsPermission)
            {
                var requestFit = permissionRequest.ControlType == ((AdditionalViewControlsPermission)permission).ControlType &&
                                 permissionRequest.Message == ((AdditionalViewControlsPermission)permission).Message &&
                                 permissionRequest.MessageProperty == ((AdditionalViewControlsPermission)permission).MessageProperty &&
                                 permissionRequest.Position == ((AdditionalViewControlsPermission)permission).Position &&
                                 permissionRequest.BackColor == ((AdditionalViewControlsPermission)permission).BackColor &&
                                 permissionRequest.ForeColor == ((AdditionalViewControlsPermission)permission).ForeColor &&
                                 permissionRequest.FontStyle == ((AdditionalViewControlsPermission)permission).FontStyle &&
                                 permissionRequest.Height == ((AdditionalViewControlsPermission)permission).Height &&
                                 permissionRequest.FontSize == ((AdditionalViewControlsPermission)permission).FontSize &&
                                 permissionRequest.DecoratorType == ((AdditionalViewControlsPermission)permission).DecoratorType;
                return(requestFit);
            }
            return(false);
        }