Restrict access to parts of admin pages I've setup a site for a client I want them to have access to edit content, but some of the permissions grant too much control for my liking. Can someone give me a way to be a bit more selective with permissions. These are my areas of interest.


I have a custom block which contains 2 editable fields, To allow access I have to grant access to Administer Blocks, which give the user access to reposition the block, I would like this to disabled, and also the Regional and Visability settings to be disabled.
When editing a Basic Page node, I have an image field which I dont want the user to be able to adjust.


Any clever people out there know the answers?
The only way I can think of is to implement hook_form_alter() and add the "#access" property to the form fields you don't want to be accessible from the user.
Normally you should use code similar to the following one, but every function that returns FALSE when the current logged-in user should not access the form field would work too.

$form['form_field']['#access'] = user_access("access form_field");


The permission the code checks can be any of the permissions the module implements, or other modules implement.