I wanted to install a terms and condition that would apply only to users with a particular role, so i checked "View Terms and Conditions" permission for only that role.

To my dismay, the T&C now appear on the user registration form, which is a deal breaker.

How can I limit T&C to a particular role?

Comments

aaronbauman’s picture

Title: "View Terms and Conditions" permission: what does it do? » add "accept Terms and Conditions" permission to control which users see T&C by role/permission
Category: support » feature
StatusFileSize
new996 bytes

Upon closer inspection, this permission only controls access to /legal, which will not address my concern.

I've created a patch that will accomplish what I'm trying to do, namely hide T&C from user registration and only show to users of a certain role.
This is quite rudimentary, and I don't expect it to get included into this module.
However, it's here in case anyone else is looking for this functionality.

If this module is still being maintained, I'd be interested to hear from maintainers if this is a feature they'd be willing to consider, and how this patch might get updated to be considered for inclusion.

Title updated to reflect feature request.

aaronbauman’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

Updated patch works correctly now, allows login.

Status: Needs review » Needs work

The last submitted patch, legal-terms_by_role-1661488-2.patch, failed testing.

acrollet’s picture

Title: add "accept Terms and Conditions" permission to control which users see T&C by role/permission » add "skip Terms and Conditions" permission to control which users see T&C by role/permission
Version: 6.x-8.x-dev » 7.x-1.x-dev
Component: Documentation » Code
Status: Needs work » Needs review
StatusFileSize
new1.34 KB

I had this need as well, so I've updated this patch for 7.x-1.x - To me it makes more sense to make the permission "skip Terms and Conditions", so that it's opt-out and the default behavior remains the same.

Status: Needs review » Needs work

The last submitted patch, legal-allow_role_skip_legal-1661488-4.patch, failed testing.

acrollet’s picture

Status: Needs work » Needs review
StatusFileSize
new1.22 KB

re-rolled against head with correct root.

acrollet’s picture

Updated patch that also prevents roles with the "skip Terms and Conditions" permission from having to accept the T&C when editing their account.

Status: Needs review » Needs work

The last submitted patch, legal-allow_role_skip_legal-1661488-7.patch, failed testing.

fuzzy76’s picture

This is also needed to avoid having the Legal module break accounts used for accessing web services through the Services module. As it is now, the Legal module causes the webservices to return an HTML document, which completely breaks the webservice.

acrollet’s picture

Status: Needs work » Needs review
StatusFileSize
new1.5 KB

re-roll

sebsebseb123’s picture

StatusFileSize
new622 bytes

Hi All,

#10 looks good and adds the functionality described in the description... but, for those of you who are looking to ONLY bypass the T&C during login by role... here's a different patch.

Best,

jbeuckm’s picture

Is there yet a way to skip T&C when registering a new account via Services?

haggins’s picture

Issue summary: View changes

#10 and #11 looking both very good. However, we should also add the inverse 'Requre Terms and Conditions check during login' in case authenticated users without additional roles don't need to accept T&C while a specfic role like 'Merchant' has to.

robert castelo’s picture

Status: Needs review » Fixed

Implemented as part of this other issue:

https://www.drupal.org/node/1703336

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.