I noticed with 2.6.2 that when a user changes their fullname, for
all
the groups in which they are a member, their member identifier is
changed from the logname (which I normally use as the identifier) to
the
new fullname. Is that the intended behavior?
Yes. This is not configurable.
Why? What's the point of changing the name of the identically-same
group memberships? Why not leave them as they were - a change in
fullname would not logically imply a change in a group membership,
would
it?
Functionally, what we want to do is simple: when you change your login
ID from "terry" to "steichen", or change your full name, JSPWiki wants
to make sure that ACLs and group memberships don't break. If you
change your login or full name in the user profile, your ACL and group
memberships should still work.
We do this via a search-and-replace type operation after the profile
is saved. We look for any and all of the old Principals (full/login/
wiki name) from the old profile and replace any we find with the
fullname. That might not be good for your purposes, but I do know that
functionally the works as it should: you can change the various names
in your profile, and ACLs and groups still work. It's worth
remembering, by the way, that for a long time you could NOT change
your login name, or wiki name, or full name. Now you can.
If you need an ironclad guarantee that only particular things are
changed (e.g., if the login name hasn't changed, don't change the
login name), the code in GroupManager.actionPerformed() is what does
it. We'd gratefully accept a patch if you want it to work differently
(hint hint).
Second, when the above change occurs, JSPWiki does not appear to
recognize that user's membership in the appropriate groups until
that
user logs out and then logs back in. Is that intended behavior?
That is odd. Sounds like a bug. Could you open a JIRA ticket with
precise steps to reproduce?
Sure - but I guess my question is whether anyone else has tested this
and come up with different behavior (from that I described)? Has
anyone
changed their fullname and then verified that the normal group
relationships remained intact without a logout/login? (Remember
that I
do have some customized stuff, so I'm never sure how they will
interact
with changes in JSPWiki. No point in entering a trouble ticket if I'm
the only one experiencing it.)
This isn't a condition we test for as part of web unit tests, so I
can't tell if this is anomalous to you or not. If it's easy to
reproduce, then that would help members (and me) figure out if this is
a bug or just local to your customizations. It would also be useful if
we wanted to make a unit test out of it.