This makes notifications type-based permissions more accurate. Previously it would check to see if nodetype was enabled for a type, so for instance you couldn't enable grouptype or authortype for a given content type unless nodetype was enabled.
Also, it checks for each nid too, which affects the UI and security such that if a node is of a type for which a subscription is disabled, that subscription can't be created and the links won't show. For instance, previously nothing actually stopped you from manually subscribing to a given nid of a disabled content type--it was just the subscribe to thread link that disappeared in the UI.
The admin settings are somewhat confusing in that things that aren't type-specific, such as "author" subscriptions, still get granularized per content type. This only affects the UI, which is something, but has nothing to do with the actual subscription creation. This is not the end of the world though as it kinda combines two settings into one, although perhaps it should ideally be handled by the notifications UI module instead somehow.
David
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | notifications.subtype.patch | 8.11 KB | David Goode |
| #3 | notifications_callback_patch.patch | 4.5 KB | David Goode |
| notifications_content.access.patch | 2.32 KB | David Goode |
Comments
Comment #1
David Goode commentedpossibly committable, needs review by myself mostly
Comment #2
David Goode commentedcommitted, may reevaluate these higher-granularity settings later in another issue.
Comment #3
David Goode commentedAnother patch to make the options callbacks return options based on subscription type. For instance, the type field maybe should return "blog" and "announcement" if a grouptype subscription is in question, and "group" if a nodetype subscription is being made. Currently it defaults to nodetype. This is a minor API change that may break other notifications implementing modules depending on how they expect their arguments to the options callback they provide. Please review and test if you can, I will do the same, and will probably commit soon after some more contemplation and soul searching ;-)
David
Comment #4
David Goode commentedNew patch, probably will commit imminently.
Comment #5
David Goode commentedCommitted, please reply if any problems are found. Also, patch to notifications cck committed to support new API. Minor API change may slightly break existing custom or add-on modules--format and similar callbacks now pass in subscription type as a final additional argument to called functions.