diff --git a/browscap.module b/browscap.module index 7168c60..e463387 100644 --- a/browscap.module +++ b/browscap.module @@ -70,13 +70,22 @@ function browscap_menu() { } /** + * Implementation of hook_perm(). + */ +function browscap_perm() { + return array( + 'bypass browscap monitoring', + ); +} + +/** * Implementation of hook_exit(). * * Keep tabs on browsers that visit */ function browscap_exit() { // If monitoring is enabled, record the browser - if (variable_get('browscap_monitor', FALSE)) { + if (variable_get('browscap_monitor', FALSE) && !user_access('bypass browscap monitoring')) { if ($browser = browscap_get_browser()) { $browserstring = empty($browser['parent']) ? 'Default Browser'