• Hi,

    I’ve got a question about Users Roles Setting.
    Can we add to a person a second role according to the first one, and not according to CAS attributes ?

    Exemple :
    My website is a community site for my enterprise and its clients.
    – All clients should have an Participant Role (it’s a bbpress Role)
    – Employees should have an Editor Role and Participant Role
    – Few employees will have an Administrator Role to manage the site. They have to have an another role associated : Keymaster (bbpress role)

    My question :
    Can I specified in Users Roles Settings something like :
    – Keymaster|( WordPress Role -EQ “Administrator” )

    Other bug :
    When I specified several rules, they applicated to all my users, not only those who match conditions.
    – Adminitrator |(CAS{prenom} -EQ “Romane”) -AND (CAS{mail} -CONTAINS “Romane.LEGUEDE”)
    Only user Romane should be define as Administrator, but when I try a connexion with an anoter account, this user become Admin too.

    Any idea ?

    Thanks for any help.

    https://www.ads-software.com/plugins/wp-cassify/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter rleguede

    (@rleguede)

    Hi again,

    I really have a problem with users rules.
    I define several rules :

    • editor|(CAS{mail} -ENDWITH “capcir.fr”)
    • administrator|(CAS{prenom} -EQ “Romane”) -AND (CAS{mail} -ENDWITH “capcir.fr”)
    • bbp_keymaster|(CAS{prenom} -EQ “Romane”) -AND (CAS{mail} -ENDWITH “capcir.fr”)
    • bbp_moderator|(CAS{mail} -ENDWITH “capcir.fr”)
    • bbp_participant|(CAS{etab} -NEQ “Capcir”)

    But, when a user who should be a participant connect to the site, he’s got admin role. Don’t understand why.
    An other user, who should not be a participant, has a participant role and moderator and editor like expected. But He should not be a participant !

    Any idea ?

    Is there a problem with uppercase ? or with the order of rules ? How does it works ?

    I’m working with WP 4.5.3 and CAS protocol 2.

    Best regards.

    Hi,

    It’s a bug on rule solver. Please update to 1.9.2
    Best regards.

    Thread Starter rleguede

    (@rleguede)

    Hi,

    It’s working better now ! Participants are

    n’t administrator anymore.

    But, I still have a problem with this rule :
    bbp_participant|(CAS{etab} -NEQ “Capcir”)

    What I want to do : anybody who is not from enterprise “Capcir” is a participant.
    What I have :

    • when a single participant connect, it’s ok.
    • when a person from Capcir connects, it’s not ok : he is participant and editor. I want him to be editor, not participant.

    I think my rule is not clear enough. I change also the role by defaut in WP settings to “Abonné” and not to “Participant”, but doesn’t change the problem. I retrieve the rule, then Capcir members are Editor and no more Participant.

    Does it possible to create a rule like :
    -NEQ (CAS{email} -ENDWITH “capcir.fr”) ?

    I mean, I want a rule to say “if email contains capcir.fr, then it’s NOT a participant”

    Do you think it’s possible ?

    Thanks,
    Best regards.

    Hi,

    Sorry, but it’s another bug on NEQ operator. Upgrade to 1.9.3 and re-test your rules without changes.
    Keep me informed.

    Best regards.

    Thread Starter rleguede

    (@rleguede)

    Hi,

    It’s working very well !
    Thanks a lot for your reactivity ??

    Have a good day and a nice week-end,

    Best regards.

    Hi –
    I have a tangental request. Would it possible to have an opt in setting to reactivate the orginal functionality. (One role assigned to user when WPCASSIFY generates the account)
    So if the is a rule defining a user as an administrator, they are just an administrator not also a subscriber.

    Thanks,
    SB

    Hi,
    Now, no role is pushed by default because due to security concerns. If user match with 2 rules (one for admin ans one for subscriber), two roles are pushed to user.
    Best regards.

    Thread Starter rleguede

    (@rleguede)

    Hi,

    I have an another request : can we define users roles only if it’s their first connexion to the site ?

    For next connexion, roles should be those from WP Profil.

    Do you think it’s possible ?

    My example here, it’s my users can evolve in the site and become Editor or Administrator (if the admin quit his job, for example). And if I change these roles in WP profile, WP-Cassify actually will replace roles by those defined in rules.

    How can I manage this case ?

    Thanks for any help ??

    Hi,
    I think the best answer is to add an plugin option “purge user roles before applying rules”.

    So, if your users accounts are stored in an openldap exposed throught CAS and if you want to switch an administrator to a simple subscriber, you’ve just to move user account in another OU (LDAP organizational unit). Then user account become new attributes from his new OU.

    Then on each login, users roles are deleted and new roles are pushed according to CAS attributes.

    Because users roles rules are build according to CAS Users attributes.

    So, if there is some changes, they must be performed into CAS user database (ie LDAP, SQL database, File). And WP Cassify users roles rules reapply changes to WP user profile.

    This is not the role of plugin to manage users changes. Changes must ne done in users database source.

    Best regards.

    Thread Starter rleguede

    (@rleguede)

    Hi,

    Alright, so that is an organizational issue on my enterprise process.
    I have to discuss about that process with direction and so adapted it to the plugin and not the opposite :-).

    Thanks a lot, you help me so much during all my internship (I finish it in few days), so again thank you very much ??

    Bonne continuation !

    Best regards,
    RL

    Thread Starter rleguede

    (@rleguede)

    Hi again,

    Another question : can we limited the number of roles assigned to a user ?
    For example 2 roles and no more ?
    And have to manage case if conflict with more roles (defined the 2 roles by level : higher level applied)

    Thanks,

    Best regards

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Users Roles Setting’ is closed to new replies.