Anonymous

My feedback

  1. 3 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    under review  ·  1 comment  ·  Feedback » Improvements  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Anonymous commented  · 

    Here is a patch to do this
    Regards,
    bendev

    diff --git a/tawk_to.module b/tawk_to.module
    index d1aaaa1..278e174 100644
    --- a/tawk_to.module
    +++ b/tawk_to.module
    @@ -67,7 +67,7 @@ function tawk_to_menu() {
    'position' => 'left',
    'weight' => -100,
    'page callback' => 'system_admin_menu_block_page',
    - 'access arguments' => array('administer site configuration'),
    + 'access arguments' => array('administer tawk configuration'),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
    );
    @@ -76,21 +76,21 @@ function tawk_to_menu() {
    'title' => 'Widget',
    'description' => 'Included tawk.to widget configuration',
    'page callback' => 'tawk_to_widget_customization',
    - 'access arguments' => array('administer site configuration'),
    + 'access arguments' => array('administer tawk configuration'),
    'type' => MENU_NORMAL_ITEM,
    );

    $items['admin/config/tawk/setwidget'] = array(
    'title' => 'Set widget',
    'page callback' => 'tawk_to_set_widget',
    - 'access arguments' => array('administer site configuration'),
    + 'access arguments' => array('administer tawk configuration'),
    'type' => MENU_CALLBACK,
    );

    $items['admin/config/tawk/removewidget'] = array(
    'title' => 'Remove widget',
    'page callback' => 'tawk_to_remove_widget',
    - 'access arguments' => array('administer site configuration'),
    + 'access arguments' => array('administer tawk configuration'),
    'type' => MENU_CALLBACK,
    );

    @@ -164,3 +164,17 @@ function tawk_to_remove_widget($a = 0, $b = 0) {

    drupal_json_output(array('success' => TRUE));
    }
    +
    +
    +/**
    + * Implements hook_permission()
    + */
    +function tawk_to_permission() {
    + return array(
    + 'administer tawk configuration' => array(
    + 'title' => t('Access tawk to configuration'),
    + 'description' => t('Gives the permission to access tawkto plugin configuration.'),
    + ),
    + );
    +}
    +

    Anonymous shared this idea  · 
  2. 7 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    under review  ·  0 comments  ·  Feedback  ·  Flag idea as inappropriate…  ·  Admin →
    Anonymous supported this idea  · 

Feedback and Knowledge Base