Not sure if this module is still actively being developed however I ran into an interesting dilemma. If I have additional roles setup such as role1, role2, role3, etc so the user in theory could have the roles authenticated user and say role1 and role2 and I have the content trigger on anonymous and authenticated user (in other words I only want role1, role2, etc to be able to access the content) the way the module works is it will display the paywall message since the user have authenticated even though he has role1.

I know that I can overwrite the check with the hook_field_paywall_paywall_alter function however if I ran into it others may as well.

Suggestions?

Comments

Christopher Riley created an issue.

codesidekick’s picture

I can definitely see the issue here. It comes a bit from the fact that the permissions in this module are reversed - so you're indicating roles which should be denied as opposed to roles which should be granted access.

The hook is a good way to do it, and if you want to post up what you did for other users to find that would be great.

The other way to do it might be to reverse the way permissions work but then there would have to be default permissions created for all content types and whenever a content type is created as I think most sites wouldn't want all content types to be protected by default.

Christopher Riley’s picture

I myself think that it would make more sense for us to check the ones that should be allowed to see content as this goes more in line with how other modules does it. If anyone is interested in what I am doing now feel free to let me know and I will post it otherwise I would prefer to see things flipped so that we check who can see it instead.

Just my two cents worth.

codesidekick’s picture

Welcome a patch, looks like the components would be:

  • Migration script to port across existing field_paywall settings - how will this play in with features configurations?
  • A way of setting the default access to be true unless specified otherwise