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

Comments

David Goode’s picture

Status: Needs work » Needs review

possibly committable, needs review by myself mostly

David Goode’s picture

Status: Needs review » Fixed

committed, may reevaluate these higher-granularity settings later in another issue.

David Goode’s picture

Status: Fixed » Needs review
StatusFileSize
new4.5 KB

Another 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

David Goode’s picture

StatusFileSize
new8.11 KB

New patch, probably will commit imminently.

David Goode’s picture

Status: Needs review » Fixed

Committed, 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.

Status: Fixed » Closed (fixed)

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