The method at https://github.com/apache/jackrabbit-oak/blob/160d2be57c8e7733466a5bbe9ee88afaa2025c96/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/UserUtil.java#L56 requires to pass the org.apache.jackrabbit.oak.spi.security.ConfigurationParameters object, so I am wondering whether there is an easier solution than just comparing the id against this method’s return value…. Just checking against a hardcoded user id seems wrong as well, as this can be potentially reconfigured.
> On 12. Apr 2023, at 10:49, Konrad Windszus <[email protected]> wrote: > > How do I figure out if a org.apache.jackrabbit.api.security.user.User object > is representing the anonymous user[1] or not. > Unfortunately the interface only has methods isAdmin and isSystemUser [2] > Any pointers appreciated. > Thanks in advance, > Konrad > > > [1] - > https://jackrabbit.apache.org/oak/docs/security/user/default.html#anonymous-user > [2] - > https://javadoc.io/doc/org.apache.jackrabbit/oak-jackrabbit-api/latest/org/apache/jackrabbit/api/security/user/User.html
