protected override bool IsAuthorized(HttpActionContext actionContext) { var userDto = actionContext.GetCurrentUser(); if (userDto == null) { return(false); } return(true); }
protected override bool IsAuthorized(HttpActionContext actionContext) { var userDto = actionContext.GetCurrentUser(); if (userDto == null) { return(false); } var user = userDto.ToUserEntity(); using (var accessControl = new AccessControl(user)) { return(accessControl.UserHasRole(roleTitle)); } }