Here the idea is to avoid defining dozens of roles to account for delicate permission requirements of users.

Say, on a certain node that has 100 fields, a webmaster may eventually need to define several hundreds of permission sets, many of them are needed for very few users on and ad hoc manner. Being able to define field permissions for particular users gives the webmaster ultimate flexibility and avoids insane proliferation of roles.

I appreciate your hints about this possibility.

  • Have you tried Field Group module? i hope you can specify a permission to a set of fileds. Giv a try and please let me know the status.
    – niksmac
    Commented Nov 23, 2012 at 4:00

1 Answer 1


You can manage this with #access if you're using hook_form_alter to make and manage the fields.

Description: Whether the element is accessible or not; when FALSE, the element is not rendered and the user submitted value is not taken into consideration.

Another idea is get help of access callback in hook_menu

"access callback": A function returning TRUE if the user has access rights to this menu item, and FALSE if not. It can also be a boolean constant instead of a function, and you can also use numeric values (will be cast to boolean). Defaults to user_access() unless a value is inherited from the parent menu item; only MENU_DEFAULT_LOCAL_TASK items can inherit access callbacks. To use the user_access() default callback, you must specify the permission to check as 'access arguments'

The idea is to make a function that resolves permissions for individual user for certain pages.

  • Is #access integrated in any module, and if not, what is the best way to implement it? Thanks
    – alfish
    Commented May 22, 2012 at 9:16
  • Make a custom module to implement #access. i.e. function mymodule_form_alter(&$form, $form_state, $form_id) { $form['field_YOUR_FIELD_NAME']['#access'] = FALSE; } add if statements where needed.
    – Mike
    Commented May 22, 2012 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.