lasdf1234 commented on code in PR #12332:
URL: https://github.com/apache/gravitino/pull/12332#discussion_r3703636878
##########
core/src/main/java/org/apache/gravitino/authorization/AccessControlDispatcher.java:
##########
@@ -145,6 +183,33 @@ User enableUser(String metalake, String externalId)
User disableUser(String metalake, String externalId)
throws NoSuchUserException, NoSuchMetalakeException;
+ /**
+ * Disables a User by Gravitino-assigned id without removing role bindings.
+ *
+ * @param metalake The Metalake of the User.
+ * @param userId The Gravitino-assigned id of the User.
+ * @return The updated User instance.
+ * @throws NoSuchUserException If the User with the given id does not exist.
+ * @throws NoSuchMetalakeException If the Metalake with the given name does
not exist.
+ * @throws RuntimeException If updating the User encounters storage issues.
+ */
+ User disableUserById(String metalake, long userId)
+ throws NoSuchUserException, NoSuchMetalakeException;
+
+ /**
+ * Updates the external identifier of a User by Gravitino-assigned id.
+ *
+ * @param metalake The Metalake of the User.
+ * @param userId The Gravitino-assigned id of the User.
+ * @param newExternalId The new external identifier, or null to clear it.
+ * @return The updated User instance.
+ * @throws NoSuchUserException If the User with the given id does not exist.
+ * @throws NoSuchMetalakeException If the Metalake with the given name does
not exist.
+ * @throws RuntimeException If updating the User encounters storage issues.
+ */
+ User updateUserExternalId(String metalake, long userId, String newExternalId)
Review Comment:
The upstream system might change the 'externalId' based on the 'userId', so
I have renamed this method: 'updateUserExternalIdById'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]