Ejemplo n.º 1
0
 public bool IsAuthorize(ActionEntityTypeEnum workflowEntities, DecisionTypeEnum decisionTypeEnum, ClaimsPrincipal userClaimsPrincipal)
 {
     var methodMapper = new MethodMapper();
     var methodRequiredActions = methodMapper.MapWF(workflowEntities, decisionTypeEnum);
     List<ActionType> userActions = _userActionMapper.MapToEntity(userClaimsPrincipal);
     return _securityApplicationService.IsAuthorize(userActions, methodRequiredActions);
 }
Ejemplo n.º 2
0
        public bool IsAuthorize(string className, string methodName, ClaimsPrincipal userClaimsPrincipal)
        {
            var methodMapper = new MethodMapper();
            var methodRequiredActions = methodMapper.Map(className, methodName);

            List<ActionType> userActions = _userActionMapper.MapToEntity(userClaimsPrincipal);
            return _securityApplicationService.IsAuthorize(userActions, methodRequiredActions);
        }