예제 #1
0
        public async Task Should_throw_for_query_if_no_permission()
        {
            SetupUser(false, false);
            SetupSchemaFound();

            var ctx = requestContext;

            await Assert.ThrowsAsync <DomainForbiddenException>(() => sut.QueryAsync(ctx, schemaId.Name, Q.Empty));
        }
예제 #2
0
        public async Task QueryAsync_should_throw_if_user_has_no_permission()
        {
            var ctx = CreateContext(isFrontend: false, allowSchema: false);

            await Assert.ThrowsAsync <DomainForbiddenException>(() => sut.QueryAsync(ctx, schemaId.Name, Q.Empty));
        }
        public async Task Should_throw_exception_if_user_has_no_permission_to_query_content()
        {
            var requestContext = CreateContext(allowSchema: false);

            await Assert.ThrowsAsync <DomainForbiddenException>(() => sut.QueryAsync(requestContext, schemaId.Name, Q.Empty));
        }