0

I am a newbie into Drupal 7.
I am learning D7 views. I exported a view and found :

$handler->display->display_options['access']['type'] = 'perm';

with no permission array to specify the user group who can access this view.
Which user group does it take by default? Also, in my custom view in code I have replaced it with following:

$handler->display->display_options ['access']['type'] = 'role';
$handler->display->display_options['access']['role'] = array(
    3 => '3',
);

It is working fine. I want to know all possible values of $handler->display->display_options this array. Where can I find all these options? Is there any documentation available for this?

0

Restrictions to access view can be set through Views UI to "role", "permission" or "none". See this page in Views documentation.

As for "role", those are IDs of different roles on your website. You can find those IDs in adiministration admin/people/permissions/roles - just hower over role edit link, number is in its URL.

  • It just gives options for $handler->display->display_options['access']['type'], I want to have a look at all of them. Is there any doc available for this? – meen Jul 3 '15 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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