anchela commented on code in PR #1882: URL: https://github.com/apache/jackrabbit-oak/pull/1882#discussion_r1863346185
########## oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImpl.java: ########## @@ -42,12 +42,16 @@ class UserImpl extends AuthorizableImpl implements User { private final boolean isAdmin; + private final boolean isAnonymous; private final PasswordHistory pwHistory; + private final boolean allowDisableAnonymous; UserImpl(String id, Tree tree, UserManagerImpl userManager) throws RepositoryException { super(id, tree, userManager); isAdmin = UserUtil.isAdmin(userManager.getConfig(), id); + isAnonymous = UserUtil.getAnonymousId(userManager.getConfig()).equals(id); + allowDisableAnonymous = userManager.getConfig().getConfigValue(UserConstants.PARAM_ALLOW_DISABLE_ANONYMOUS, true); Review Comment: @Amoratinos , it should be possible to retrieve the configuration params on the fly.... the usermanager field stored with the base class is an instance of UserManagerImpl, which comes with a method getConfig(), which are the config params obtained from UserConfiguration afaik. so, i believe it's possible to move the evaluation to the validateDisableUser method and avoiding story isAnonymous _and_ avoiding storing the config params again as they are already attached to the user manager -- 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: oak-dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org