Active
Project:
Simplenews
Version:
4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2011 at 22:47 UTC
Updated:
2 Apr 2025 at 18:33 UTC
Jump to comment: Most recent
Would be nice to add the ability to set the subscribe/unsubscribe permission per individual newsletter. Some newsletters you may want to restrict to just authenticated users, or to admins and so forth. If this is already included and I missed it I apologize, though I've not seen it yet.
Use case:
There are two roles:
There are two newsletters:
Desired result:
Is this possible?
Want to have fine grained control over subscriptions by role, but not see how it's possible.
Add fine grained control by role over who can subscribe to specific newsletters.
Add this feature, alternatively document how to do it, perhaps with another contrib module?
Comments
Comment #1
simon georges commentedNope, it's not included, but it's more of a taxonomy access control matter than a Simplenews issue, I think.
Did you try modules like Acces By Term, or things like that ?
(On a side note, I think those kind of modules is targeted at node handling, not directly terms, so maybe Simplenews would have to add a fonctionnality...). I let this issue open, to think about it).
Comment #2
michaellander commentedSimon, I'll try a few different methods and see if I can find some means of making it work. I can also work on a patch to add it to simplenews, or I can possibly create a sub-module that adds it. Thanks for considering it!
Comment #3
simon georges commentedWell, if you come to something clean, don't hesitate to post it here, if I find some time, I'll try on my side.
Comment #4
berdirI don't know if there are any taxonomy term restriction modules available, but core does define the 'term_access' query tag, so it should be possible to write one. Note that most modules of these modules, including the linked one in #1, are about node_access by using term assignements for the configuration. So that doesn't help here.
So to implement this, we'd need to make sure to either add a term_access tag to all taxonomy_term_data queries and also properly for success in check all cases where a category is loaded and fail gracefully in case access is denied.
That said, the problem with that approach is that's all or nothing. You either have access or you don't. To implement for example the ability to control which users can create newsletters of which category, we'd need to explicitly check and define permissions for each term.
This is possible but has some downsides, e.g. that the list of permissions can get really long and is then complicated to set up if you have 10, 20 or even more different newsletters.
Comment #5
miro_dietikerPromoting to 8.x roadmap / wishes.
Comment #6
adamps commented#1, #4: NB This issue is about access to control access per newsletter to subscribe. It's not about access to create/send newsletters.
We already have an additional option on the newsletter: hidden (no access) / visible (anyone access). We can add a third state: create permission (selective access).
Comment #7
geek-merlinI suppose access via group/og integration might be a viable (if not better) alternative for some use cases.
Comment #8
adamps commentedAnyone is welcome to create a separate project for integration with another contrib module (of course check if there is already one). This issue is for permissions per-newsletter. I don't see that we can say either approach is better than the other - different sites will have different needs.
Comment #9
adamps commentedComment #10
ressaI am also looking for this, and am adding the relevant Issue Summary from a now "closed as duplicate" issue.
It would be fantastic to be able to control subscription options by role.