nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-registry] bbende commented on a change in pull request #232: NIFIREG-292 Add DB impls of UserGroupProvider and AccessPolicyProvider
Date Thu, 17 Oct 2019 14:29:10 GMT
bbende commented on a change in pull request #232: NIFIREG-292 Add DB impls of UserGroupProvider
and AccessPolicyProvider
URL: https://github.com/apache/nifi-registry/pull/232#discussion_r336039143
 
 

 ##########
 File path: nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/security/authorization/AbstractPolicyBasedAuthorizer.java
 ##########
 @@ -269,10 +272,13 @@ public final synchronized User updateUser(final User user) throws AuthorizationA
     /**
      * Deletes the user with the given id.
      *
+     * @deprecated use {@link #deleteUser(User)} instead
+     *
      * @param userIdentifier the identifier of the user to delete
      * @return the user that was deleted, or null if no matching user was found
      * @throws AuthorizationAccessException if there was an unexpected error performing the
operation
      */
+    @Deprecated
 
 Review comment:
   Good question... when I first started working on this I had a different approach for optimistic-locking
that was going to require the provider to handle it, so I needed to pass more than just an
id into delete (either id + version, or the entity with version populated). 
   
   So I had gone through the app and made the service layer first retrieve the entity by id
and ensure it exists, then pass the entity to the other overloaded delete method. I also saw
that NiFi's impls of these classes didn't have the "by id" methods.
   
   At this point I guess we could do one of the following...
   
   - Remove the deprecated notice, the methods will just be unused
   - Leave deprecated and remove later
   - Remove them all together in this PR since it is a major version anyway
   
   I'm fine with any of these options, let me know what you prefer.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message