I've had some issues when I set the 'View Terms and Conditions' permission that only Role A is allowed to see the legal, the Role B have see the legal too. --> Not good!

I've added 2-3 simple code fragment in this patch. It tested if the user has permission to see the legal. When Not, skip legal.

Now only Roles which have Permission 'View Terms and Conditions' is set, see the legals.

Tested and works when:
- New user first login (Role A see, Role B not)
- Legal has changes and user log in (Role A see, Role B not)
- In profile edit form (Role A see, Role B not)

Please give Feedback

Comments

danielen’s picture

danielen’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: only_specific-role_see_legal-2530608-0.patch, failed testing.

danielen’s picture

danielen’s picture

danielen’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: only_specific-role_see_legal-2530608-0.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: only_specific-role_see_legal-2530608-0.patch, failed testing.

grn’s picture

I tried to apply this patch #5 manually, but anonymous users can still see T&C on the user registration form. Hmm, how to avoid this?

Thanks.

/GrN.dk

robert castelo’s picture

Status: Needs work » Fixed

There are new options in the 7 dev branch for restricting T&Cs by role, please try out and if it doesn't fit your user case reopen this issue again.

Status: Fixed » Closed (fixed)

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