public async Task <List <IPage> > GetAllPages(string projectId, CancellationToken cancellationToken = default(CancellationToken)) { return(await _pageQueries.GetAllPages( projectId, cancellationToken) .ConfigureAwait(false)); }
public async Task <List <IPage> > GetAllPages( string projectId, string userName, string password) { var permission = await security.ValidatePermissions( projectId, userName, password, CancellationToken ).ConfigureAwait(false); if (!permission.CanEditPosts) { return(new List <IPage>()); // empty } return(await pageQueries.GetAllPages( projectId, CancellationToken) .ConfigureAwait(false)); }