You are here

function scs_perm in Simplenews Content Selection 6.2

Same name and namespace in other branches
  1. 6 scs.module \scs_perm()

Implements hook_perm()

File

./scs.module, line 60
Select Drupal content to create a newsletter

Code

function scs_perm() {
  $perms = array(
    'administer scs',
    'scs create newsletters',
  );
  if (variable_get('scs_types', '') != '') {
    $types = _scs_get_types();
    unset($types[0]);
    foreach ($types as $type => $typename) {
      $perms[] = sprintf('use %s type', $type);
    }
  }
  return $perms;
}