I set up nodewords, and came across an issue when using it with nodecomment, which replaces regular comments with full nodes.
I have set up two meta tag fields that should appear on node edit forms: keywords & descriptions. Now every user who can post nodes as comments can set description and keywords for the node, which he should not be able to. I can set a permission for "administer meta tags" but none for "set meta tags". I actually think this is crucial, but wonder if I am missing something, because in my opinion it is absolutely undesirable that everyone who can create a node is automatically able to set its meta tags.
| Comment | File | Size | Author |
|---|---|---|---|
| #29 | nodewords-n823982-29.patch | 13.05 KB | damienmckenna |
| #26 | nodewords-n823982-26.patch | 13.01 KB | damienmckenna |
| #25 | nodewords-n823982-25.patch | 14.43 KB | damienmckenna |
| #16 | 823982-nodewords-edit-meta-tags-permission.patch | 3.25 KB | dave reid |
| #12 | nodewords_823982.patch | 307 bytes | xjm |
Comments
Comment #1
chadwick wood commentedI totally agree... I'm looking for this option myself.
Comment #2
Anonymous (not verified) commentedI am moving the report to the project that will implement this feature. There is already a permission module, but its code still needs to be expanded.
Comment #3
Anonymous (not verified) commentedThe module will actually implement the code to decide who can edit a meta tag, or not, but it will not expose additional permissions in the permissions page.
Comment #4
Narretz commentedGood to hear it's work in progress, thx!
Comment #5
Anonymous (not verified) commentedI am re-titling the report to make it clearer.
Comment #6
Witch commentedThis issue is plaguing me too, i hope a solution will be found soon.
Comment #7
sf_wind commentedsubscribe
Comment #8
Anonymous (not verified) commentedThis project is not maintained anymore. It should be implemented in Nodewords.
Comment #9
gilgabar commentedThis may not be a complete solution, but it resolved my immediate problem of having meta tag fields showing up for users who should not see them.
I added a permission for editing meta tags in nodewords.module:
Then I added a user access check to the hook_form_alter that inserts the meta tag fields in nodewords_ui.module:
I'm using 1.12-beta9 in case that is different from the dev version.
Comment #10
tinker commentedThx Gilgabar. Patch working great on Nodewords 6.x-1.12-beta9. I think this is an essential feature.
Comment #11
danny englanderSubscribe
Comment #12
xjmAttached are patches implementing #9 (one for nodewords.module, and one for nodewords_ui.module; apply both).
Comment #13
xjmApplying both patches in #12 and configuring the permission resolved the issue for me.
Comment #14
damienmckennaAdding this to the v6.x-1.12 issue list.
Comment #15
dave reidYeah this is definitely needed. The fact that anyone that can add/edit nodes or edit their own profile can also edit meta tags on the page is a bad, bad, bad thing.
Comment #16
dave reidRevised patch that adds a 'edit meta tags' permission and is used to control access to if users can view meta tag fieldset on node or account edit forms.
Comment #17
damienmckennaLooks great - adds a much-needed improvement and cleans up the existing code in the process, good stuff!
Comment #18
dave reidBANG! Committed to CVS.
http://drupal.org/cvs?commit=444264
Feels good to have this long-standing issue finally fixed.
Comment #19
damienmckennaI added a follow-up issue to expand upon this to control it per content type: #957860: Per-content type permission to control access to Nodewords fields for each content type
Comment #21
doublejosh commentedDoes this not get checked for on the node edit form? I still see them as a user without this permission.
Perhaps the "administer meta tags" permissions is meant just for the global settings?
Comment #22
Anonymous (not verified) commentedThe administer meta tags permission is used to determine which users can access the administration pages for Nodewords; the permission Dave Reid is speaking of on #16 is edit meta tags.
Comment #23
doublejosh commentedSorry, I get it. Dealing with anonymous users creating nodes, so this is extra poignant :)
Comment #24
damienmckennaNeeds to be re-rolled against the latest 6.x-1.x codebase.
Comment #25
damienmckennaI re-rolled Dave Reid's patch from #16 against the latest 6.x-1.x codebase and ensured all hook_form_alter() and hook_form_FORM_ID_alter() changes are appropriately secured.
Comment #26
damienmckennaRe-rolled against 6.x-1.x, again.
Comment #27
jwilson3Indentation is slightly off, I think.
Not about to claim I know what all this patch does.. its a biggie!
Comment #28
xjm#27: I believe that is an illusion of the diff. The whitespace is different because an additional
if ()has been added.Comment #29
damienmckennaUpdated. The logic for identifying if the user profile meta tags should be edited has been adjusted slightly, per the following comment:
The question is - is this ok? Should it just be expanded to have a separate permission for each type meta tags, i.e. one for nodes, one for terms & one for users? Should the users tags functionality be changed to have one permission or option for deciding if a user can edit their own tags and something else to decide if a "manager"-style user can modify someone else's tags? Or should we instead just rely on the core 'administer users' permission to decide some of this? Answers on a postcard - what does everyone think?
Comment #30
damienmckennaI'm starting to think that the permissions need to follow Drupal core a little more closely:
Right now we only have 'administer meta tags', so there's a long way to go.
Should we go that far with it?
Thoughts?
Comment #32
damienmckennaNot going to add this to the next release.
Comment #33
damienmckennaBumping to v2, I just feel this will require too much API changes to be worth its while right now.
Comment #34
damienmckennaMarking all v2 issues as postponed while v1 is finished off.
Comment #35
damienmckennaComment #36
damienmckennaUnfortunately this module is no longer supported, so I'm closing this issue.