The attached (huge) patch would add the anonymous role to the optionsList for user.roles.
I can imagine that this was left out because it would seem weird when creating a user – but when e.g. presenting a view of entities, or search facets on user roles (not that I would do such a thing), it's a bit annoying that the anonymous user has a "1" displayed instead of a role name.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 925212-3-user-role-list.patch | 615 bytes | mitchell |
| anonymous_role.patch | 594 bytes | drunken monkey |
Comments
Comment #1
fagoMakes sense. However then we should add a validation handler to ensure we don't allow granting the anonymous user role to a user (when writing roles back).
Comment #2
mitchell commented#1325834: Rules action: Send mail to all users of a role, authenticated missing from list is a request for a way to email all authenticated users, which is currently unavailable because Entity API unsets authenticated and anonymous.
Comment #3
mitchell commentedHere's a fairly comprehensive list of files in contrib that call
entity_metadata_user_roles:Comment #4
mitchell commented#1 is already done in af60182 with the 'edit' $op.
This patch unsets 'edit' as the default $op to help solve the use case mentioned in #2, however the 'anonymous' role is also included in 'mail_to_users_of_role'. Would this be solved with a 'view' op that only unsets 'anonymous'?
Comment #5
elBradford commentedAny updates on this issue? Issue #1325834: Rules action: Send mail to all users of a role, authenticated missing from list is depending on this patch.
Comment #6
fonant commentedPatch in #4 works fine for me to allow the "authenticated user" role to appear, and seems to make sense. Not sure about also including "anonymous user" - useful for some situations, but not all?
Comment #7
thomas1977 commentedIs this working yet?
Comment #8
ifrikThe patch in #4 works for me - and is really helpful for me.
Comment #9
chris matthews commentedThe 6 year old patch in #4 to callbacks.inc applied cleanly to the latest entity 7.x-1.x-dev and (if still relevant) may need additional reviews before RTBC.