I dont want a navigation item being chosen as a parent item to create new content on.
Danny_Joris - November 30, 2008 - 08:30
Hello everybody.
I'm trying to set up a layout for an Authenticated User. I only want to give him the Navigation Menu because i want the aministrator page being completely seperated from the actual website. (visually) I want him to be able to create content of course, but when he does, i dont want him to be able to put the Navigation Menu items as a Parent for his new content.
Can anybody help? I cant find it on google or the documentation.
Many thanks!
Danny

/
I want him to modify the website, but i dont want him to modify the cms pages where he works with.
---
I'm seeking for a job.
http://www.myspace.com/danny_joris
And i just checked that even
And i just checked that when the Authenticated user does not have the permission to even view the navigation menu, he can still add pages to it. This seems so wrong and i find it strange that its so difficult to turn this option off.
I managed to change the
I managed to change the default to something else than Navigation, thats a start. But still the option is there.
You have given the
You have given the authenticated users "administer menu" permissions? Have you considered what it means in practice? If we are talking about hundreds of posts that would make the menus unworkable.
A more realistic option is to let them tag the posts with categories (terms) and have only one one menu link for each category. Or use books.
If you are talking about a dozen pages, then you are right, those users will need to know what they are doing.
Maybe i had to be more
Maybe i had to be more clear. I am trying to set up a working space for an authenticated user who is a webmaster and he is the only webmaster. I want to give him access to some, but definetly not all administer page's. He should be able to make and adjust new page's in his menu for example. I would never give a large number of random people access to any administer page.
And maybe i should have said that the website is not online yet. I'm just experimenting with ways to get the easiest settings for clients.
But still: i turned of the navigation menu for any authenticated user, but when he wants to post a new item, theres still the option for him to embed this to a parent node from the Navigation menu, which he cant even see or handle himself.
I see. Access control to the
I see. Access control to the menu administration is rather crude. Maybe you could try some indirect method instead of giving them direct access to menu administration, for example http://drupal.org/project/taxonomy_menu
------- Edited to add:
On second thought, probably the http://drupal.org/project/nodehierarchy module is what you need.
Or even a book navigation block: http://drupal.org/node/44648
Thanks for your help
Thanks for your help Cog.rusty, but this is getting confusing for me. First, i dont find this taxonomy_menu and node hierarchy very handy at all. And if i'm not finding this handy, what will an average user think of it. If you create a new page there's already the option to choose a parent item. I find the drag and drop to make pages parents and childs and move them around very handy. I believe you when you say that this would not be very safe or is not the most elegant sollution. If there would be a module or something that would look and do the same, would be great.
At the end, the problem that is the reason i started this topic is still not solved in any way.
I really want to believe that Drupal is the best sollution, but its crazy to learn this all by myself. Its frustrating me.
One part of the nodeHierarchy for example needed 'views'. Well its frustrating, because there's all kinds of 'views'. I found it eventually by coincidence. I have the feeling i am waisting alot of time.
Nodehierarchy has
Nodehierarchy has permissions per role (in admin/user/permissions), so that users can't use the Navigation menu but only add under a parent node in another menu.
I dont want to be annoying
I dont want to be annoying but i dont know what you mean. I did see that there's a new Nodehierarchy option everytime i post a new page. But there is still the original option to select a parent node, which overrules the Nodehierarchy option. Also Nodehierarchy is not very synoptic to maintain.
The original option is only
The original option is only available to whoever has the "administer menus" permission.
ohhhh yeah, i still had that
ohhhh yeah, i still had that one administer option on because i was experimenting with that. Thank you for your patience. I'll see where i get from here.
i'm only experimenting with
i'm only experimenting with this for a few minutes now and i encountered some weird bug. If i click once too much on a parent node to collapse, this thing will double, tripple and quadrupple itself very quick. If i refresh the screen though, everything is normal again. I think i'll have to report that in the module page?
print screen at: http://daan.realescape.be/tweakers/nodehierarchy.jpg
And why is it that when i
And why is it that when i select a default parent node, (in my case the menu called 'website') my pages still wont show up there when i assign a new page? They end up nowhere. But they're embedded correctly. The only thing is that i dont see them. I can assign them in the classic way to a parent and then it works. But the whole point of this new module was that i wouldnt have to use that anymore.
plus: the page where i can reorder these are also part of the administer menu. Why isn't this a bad setup and my previous one was?
I have no personal
I have no personal experience with that module and have no idea whether it works at all. I just heard about it, saw some favorable user feedback, and took a look at it for a minute or so.
What do you mean about the administer menu? Does it give your users any options that they shouldn't have?
Actually not really, but you
Actually not really, but you said yourself that access control to the menu administration is rather crude. The only problem is see that if the user changes the url correctly (trough guessing) he can modify other menu's which are invisible to him. But that would be silly as he would undermine his own cms system.
And if acces control to some administer options would be a bad idea, why is it that there are so much options in the permissions menu to actually give access to them? I thought that doing this was part of the basic working of Drupal, but as i'm a beginner i could be wrong.
Access to administration
Access to administration options is not generally a bad idea. In community sites you often delegate various administrative stuff to many people. I was referring specifically to the "administer menus" permission, which may be a bad idea if the people involved don't understand well the layout of the site.
Drupal's default logic is not to separate administration from the other operations (there is no "back room" for administrators), and to show to any user only whatever options they have permissions for. If some users can see the administration menu, containing some options, that means that they have been given some administrative permissions.
This may seem unnatural to you if you already have in mind a different workflow for your site, but if your site's design requires a different approach then you need to do some customization, either setting up your own custom menu blocks or relying on contributed modules.
Couple points that were not covered
Firstly, if you are happy with a bit of coding, you can change the options in the menu drop-down as such:
<?php
/**
* Implementation of hook_form_alter().
*/
function test_form_alter(&$form, $form_state, $form_id) {
global $user;
// Only do this for node forms
if (isset($form['#id']) && ($form['#id'] == 'node-form') && arg(0) == 'node') {
if ($user->uid != 0 && isset($form['menu']['parent'])) {
foreach($form['menu']['parent']['#options'] as $key => $value) {
if (strpos($key, 'navigation:') === 0) {
unset($form['menu']['parent']['#options'][$key]);
}
}
}
}
}
?>
This will remove all nav items for all users except for the admin user (the user setup during install)
You will need a module to do this in. The api.drupal.org has examples, such as: (ignore all excluding the form_alter hook)
http://api.drupal.org/api/file/developer/examples/node_access_example.mo...
Have a look at another modules info file to work out how to make this. The info and module files are required for all Drupal modules.
Secondly, I'm guessing that you are trying everything as that admin user? If so, don't use this account when experimenting with permission options.
The admin user, {users}.uid == 1, has special permissions in the system, and you really must assume that this user will be able to do anything.
Thirdly, create a role for the content author, and if needed, a role for site administrators
Go here /?q=admin/user/roles or just /admin/user/roles with clean urls
Now remove the permissions that you gave to the "authenticated user" and add these to the new "content author" role. Remove "administer nodes" in particular, this permission allows full modification on all nodes/blog/page/etc items. Give this to "content author", unless you want fine-grain control of permissions, then assign permissions per content type.
Create a new user, and give that user the role "content author". At this point, only that user and admin should be able to administrate and create nodes.
And just in case you haven't found this section yet, go to blocks page to hide the Nav menu from the theme.
/?q=admin/build/block
Hope this helps
Alan Davison
www.caignwebs.com.au