Drupal prevent unauthorized access -


how prevent unauthorized url access in drupal?

i tried 'access arguments' => array('access administration pages') didn't work

its given in drupal documentation on how use access arguments.this example per drupal documentation,just make more clear on how use this.

$items['test/mypage'] = array(     'title' => 'mypage',     'description' => 'welcome',     'page callback' => 'mypage_info',     'access arguments' => array('anyone can access this'),   ); 

//define user permissions.

function hook_perm() {         return array('anyone can access this'); } 

now go permissions page [administer --> user management -->permissions), there can see list of strings used access arguments.you find access argument named 'anyone can access this' in corresponding module.give necessary permission required user roles.

you more information on following links

https://drupal.org/node/553368

https://api.drupal.org/api/drupal/developer%21hooks%21core.php/function/hook_perm/6


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -