public ObjectDataReader GetView(AuthenticatedUser user, IWorkflowEngine engine) { if (user == null) { throw new UnauthorizedAccessException("Unknown user."); } using (SecurityManager.CreateContext(user)) { IMessageViewService msgVService = engine.GetServiceWithCheck<IMessageViewService>(); ViewSettings settings = msgVService.CreateViewSettings(); settings.PageNum = 1; return msgVService.GetView(settings); } }