File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
core/src/main/java/com/scalar/db Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,17 @@ default void dropRole(String roleName) throws ExecutionException {
197197 throw new UnsupportedOperationException (CoreError .AUTH_NOT_ENABLED .buildMessage ());
198198 }
199199
200+ /**
201+ * Retrieves a {@link Role}.
202+ *
203+ * @param roleName the role name
204+ * @return a {@link Role} for the given role name
205+ * @throws ExecutionException if the operation fails
206+ */
207+ default Optional <Role > getRole (String roleName ) throws ExecutionException {
208+ throw new UnsupportedOperationException (CoreError .AUTH_NOT_ENABLED .buildMessage ());
209+ }
210+
200211 /**
201212 * Retrieves a list of {@link Role}s.
202213 *
Original file line number Diff line number Diff line change @@ -382,6 +382,11 @@ public void dropRole(String roleName) throws ExecutionException {
382382 distributedTransactionAdmin .dropRole (roleName );
383383 }
384384
385+ @ Override
386+ public Optional <Role > getRole (String roleName ) throws ExecutionException {
387+ return distributedTransactionAdmin .getRole (roleName );
388+ }
389+
385390 @ Override
386391 public List <Role > getRoles () throws ExecutionException {
387392 return distributedTransactionAdmin .getRoles ();
You can’t perform that action at this time.
0 commit comments