You are here

function mailchimp_apikey_ready_access in Mailchimp 8

Same name and namespace in other branches
  1. 7.5 mailchimp.module \mailchimp_apikey_ready_access()
  2. 7.3 mailchimp.module \mailchimp_apikey_ready_access()
  3. 7.4 mailchimp.module \mailchimp_apikey_ready_access()
  4. 2.x mailchimp.module \mailchimp_apikey_ready_access()

Access callback for mailchimp submodule menu items.

File

./mailchimp.module, line 40
Mailchimp module.

Code

function mailchimp_apikey_ready_access($permission) {
  if (mailchimp_get_api_object() && \Drupal::currentUser()
    ->hasPermission($permission)) {
    return TRUE;
  }
  return FALSE;
}