Skip to content

feat(spanner): add samples for fine grained access control #2172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 15, 2022
Prev Previous commit
remove role check & exceptions
  • Loading branch information
rahul2393 committed Dec 15, 2022
commit abb9713ff53b1f26cd4a8a5833bcf071c6067370
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ static void listDatabaseRoles(String projectId, String instanceId, String databa
String databasePath = DatabaseId.of(projectId, instanceId, databaseId).getName();
System.out.println("List of Database roles");
for (DatabaseRole role : adminClient.listDatabaseRoles(instanceId, databaseId).iterateAll()) {
if (!role.getName().startsWith(databasePath + "/databaseRoles/")) {
throw new RuntimeException(
"Role +"
+ role.getName()
+ "does not have prefix ["
+ databasePath
+ "/databaseRoles/"
+ "]");
}
System.out.printf("%s%n", role.getName());
}
}
Expand Down