Skip to content

Commit

Permalink
Merge pull request #9461 from neo-technology/snowgraph-usernames
Browse files Browse the repository at this point in the history
T'wards basic user support in snowgraph
  • Loading branch information
jjaderberg authored Aug 8, 2024
2 parents 43eea8a + cff0ae9 commit b9ee481
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,26 +235,26 @@ public boolean graphExists(User user, DatabaseId databaseId, String graphNameAsS

/**
* @param failIfMissing enable validation that graphs exist before dropping them
* @param databaseName optional override
* @param username optional override
* @param databaseNameOverride optional override
* @param usernameOverride optional override
* @throws IllegalArgumentException if a database name was null or blank or not a String
*/
@Override
public List<GraphStoreCatalogEntry> dropGraph(
Object graphNameOrListOfGraphNames,
boolean failIfMissing,
String databaseName,
String username,
String databaseNameOverride,
String usernameOverride,
DatabaseId currentDatabase,
User operator
) {
// general parameter consolidation
// we imagine any new endpoints will follow the exact same parameter lists I guess, for now
var validatedGraphNames = parseGraphNameOrListOfGraphNames(graphNameOrListOfGraphNames);
var databaseId = currentDatabase.orOverride(databaseName);
var usernameOverride = User.parseUsernameOverride(username);
var databaseId = currentDatabase.orOverride(databaseNameOverride);
var parsedUsernameOverride = User.parseUsernameOverride(usernameOverride);

return dropGraphApplication.compute(validatedGraphNames, failIfMissing, databaseId, operator, usernameOverride);
return dropGraphApplication.compute(validatedGraphNames, failIfMissing, databaseId, operator, parsedUsernameOverride);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public interface GraphCatalogApplications {
List<GraphStoreCatalogEntry> dropGraph(
Object graphNameOrListOfGraphNames,
boolean failIfMissing,
String databaseName,
String username,
String databaseNameOverride,
String usernameOverride,
DatabaseId currentDatabase,
User operator
);
Expand Down

0 comments on commit b9ee481

Please sign in to comment.