Capabilities being overwritten by other groups?
-
I have two groups I’m adding to a user.
patients – capabilities: read & patient_read
veterans – capabilities: vet_read
My user is a part of two groups now, patients and veterans, with 3 capabilities: read, patient_read, and vet_read
When I add the second group (veterans) to the user, patient_read gets overwritten, or lost, or something.
if (current_user_can('patient_read')) { // do stuff } elseif ((current_user_can('doctor_read')) { // do stuff }The first condition will evaluate to false, meaning the patient_read isn’t being respected. When i remove the veterans group, all works as planned and the condition will be true.
Why would the veterans vet_read be messing with a capability from another group?
Thanks for any guidance.
The topic ‘Capabilities being overwritten by other groups?’ is closed to new replies.