Amoratinos commented on code in PR #1882: URL: https://github.com/apache/jackrabbit-oak/pull/1882#discussion_r1862479032
########## 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: I also considered it but in that case I'd have to keep a reference to the configuration parameters on each UserImpl instance. Not sure if this could have a performance impact as well. -- 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