Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Service.Tests/CosmosTests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void Init(TestContext context)
It.IsAny<string>(),
It.IsAny<Config.Operation>(),
It.IsAny<IEnumerable<string>>()
)).Returns(true);
)).Returns(false);

_application = new WebApplicationFactory<Startup>()
.WithWebHostBuilder(builder =>
Expand Down
5 changes: 3 additions & 2 deletions src/Service/Models/GraphQLFilterParsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ public Predicate Parse(
relationshipField = false;
}

// Only perform field (column) authorization when the field is not a relationship field.
// Only perform field (column) authorization when the field is not a relationship field and when the database type is not Cosmos DB.
// Currently Cosmos DB doesn't support field level authorization.
// Due to the recursive behavior of SqlExistsQueryStructure compilation, the column authorization
// check only occurs when access to the column's owner entity is confirmed.
if (!relationshipField)
if (!relationshipField && _metadataProvider.GetDatabaseType() is not DatabaseType.cosmosdb_nosql)
{
string targetEntity = queryStructure.EntityName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ public bool VerifyForeignKeyExistsInDB(

public bool TryGetExposedColumnName(string entityName, string field, out string? name)
{
throw new NotImplementedException();
name = field;
return true;
}

/// <summary>
Expand Down