--- login_destination.module 2007-09-06 03:29:10.000000000 -0700 +++ login_destination.module 2008-09-09 15:55:07.000000000 -0700 @@ -9,6 +9,16 @@ define('LOGIN_COND_ALWAYS', 'always'); define('LOGIN_COND_PAGES', 'pages'); define('LOGIN_COND_SNIPPET', 'snippet'); +// Permissions +define('LOGIN_DEST_PERM_ADMIN', 'administer login destination'); + +/** +* Implementation of hook_perm(). +*/ +function login_destination_perm() { + return array(LOGIN_DEST_PERM_ADMIN); +} + /** * Implementation of hook_form_alter(). */ @@ -33,6 +43,8 @@ function login_destination_menu() { 'description' => 'Configure where user will go after login.', 'page callback' => 'drupal_get_form', 'page arguments' => array('login_destination_admin_settings'), + 'access arguments' => array(LOGIN_DEST_PERM_ADMIN), + 'type' => MENU_NORMAL_ITEM ); $items['login_redirect'] = array(