Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 10 additions & 0 deletions core/src/main/java/com/scalar/db/api/AuthAdmin.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ default void dropRole(String roleName) throws ExecutionException {
throw new UnsupportedOperationException(CoreError.AUTH_NOT_ENABLED.buildMessage());
}

/**
* Retrieves a {@link Role}.
*
* @return a {@link Role}
* @throws ExecutionException if the operation fails
*/
default Optional<Role> getRole(String roleName) throws ExecutionException {
throw new UnsupportedOperationException(CoreError.AUTH_NOT_ENABLED.buildMessage());
}

/**
* Retrieves a list of {@link Role}s.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@ public void dropRole(String roleName) throws ExecutionException {
distributedTransactionAdmin.dropRole(roleName);
}

@Override
public Optional<Role> getRole(String roleName) throws ExecutionException {
return distributedTransactionAdmin.getRole(roleName);
}

@Override
public List<Role> getRoles() throws ExecutionException {
return distributedTransactionAdmin.getRoles();
Expand Down
Loading