Hi.
I am happy I have found your module, but it seems a bit overkill for my use case.
The site I am working on has around 20 or more content types. You can imagine how many checkboxes that is in the permissions page, for "override node options".
What I really need is just simple permissions that work across content types.
Would it be possible to have a simple version of the module included in the package? This way, people could decide to either enable the simple version, or the full version.
Or even better:
Let people enable both modules (per-type and not-per-type) to give some roles "global" permissions, and grant "per-type" access for other roles.
For the sake of backwards compatibility, the existing module would become the "per-type" one, whereas the "not-per-type" would get a new module name.
Why 2 modules?
Because sometimes I really only want the not-per-type version.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 974730-19.patch | 17.74 KB | opdavies |
| #2 | 0001-added-permissions-for-all-node-types.patch | 3.92 KB | geek-merlin |
Comments
Comment #1
webflo commentedIt should be possible to add some global permissions e.g. "override published option for all content-types". We dont need two modules. Backwards compatibility is no problem.
Comment #2
geek-merlinright. patch in the air.
Comment #3
simoneb commentedany news about this one ? does the patch work ?
Comment #4
geek-merlini'm using it all the time.
if you like it, test it and set to "reviewed", such is the game.
Comment #5
gpk commentedThis module with this patch looks like just what I need. Hope to be able to test it properly soon.
After a quick eyeball patch looks good functionally but doesn't conform to Drupal coding style.
// special permission "all node types"should be something like
// Global permissions which apply to all node types.if(!$name) $name = node_type_get_name($type);should be
Also not sure if using a key such as "___all___" is entirely kosher though I can see it would work! May be fine though. Will have a think/look.
Presumably having a global permission for an option overrides any "missing" checkbox for that option for a given node type (slightly hard to explain that clearly). i.e. permissions are additive as usual. This probably needs to be stated somewhere, maybe README.txt.
Personally I don't want the per node type permissions at all, but adding an option to only display the global permissions, or only the per node type permissions, is rather more work in terms of UI and making sure it works well when such a setting is changed so I won't suggest adding that at this stage, partly given the apparent limited interest in having the global permissions in the first place, though I suspect quite a few people are "managing" simply by ticking loads of checkboxes and would actually find global permissions useful.
Comment #6
opdaviesThe patch in #2 no longer applies, so needs re-rolling against the latest 7.x-1.x version of ONO.
Comment #7
jenlamptonHere's a reroll of the patch from #2 with a few slight changes. I didn't like the use of the
__all__token, so I just made a set of separate permissions.Comment #8
jenlamptonSince in the original issue, @donquixote mentions that he did not want all the permissions Override Node Options module provided, I also went one step further and added a settings form so that admins could decide if they needed all the granular permissions, or not. Changing the type of permissions offered wipes all the previous permissions set (if necessary), and prompts admins to return to the permissions matrix to double check on access.
Comment #10
jenlamptonSorry, that last patch was just the changes since the previous, hence the fail. This one is the complete set.
Comment #11
jenlamptonThis one doesn't forget the global comment setting.
Comment #12
jenlamptonHere's one with smarter messaging around permissions granularity changes.
Comment #13
opdaviesNoticed a
backdrop_set_message()in the last patch. ;)Comment #14
opdaviesComment #15
opdaviesComment #16
opdaviesRe-rolled patch. Current tests still pass.
Comment #17
opdaviesAdded tests for the new functionality, and added an extra permissions check for comments in
override_node_options.module.Comment #18
opdaviesReplace
backdrop_set_message()withdrupal_set_message().Comment #19
opdaviesAnother re-roll.
Comment #20
opdaviesComment #21
opdaviesComment #22
opdaviesComment #23
opdaviesComment #24
giupenni commented#19 works for me.
Comment #26
opdaviesCommitted to 7.x-1.x. Thanks everyone!
I'll add a separate commit to clean up some coding standards issues that Drupal CI has flagged, and moving this to 8.x-2.x.
Comment #28
opdaviesAdded to 8.x-2.x now too.