How can I get current users groups since the User and Group objects are marked as deprecated.
Right now I'm doing the folowing:
User user = request.getResourceResolver().adaptTo(User.class);
Iterator<Group> groupsIterator = user.memberOf();
Is there an other way to do it properly and without using deprecated methods/objects?
Much better! Thanks