You are here

function tinymce_perm in TinyMCE 6.2

Same name and namespace in other branches
  1. 5.2 tinymce.module \tinymce_perm()
  2. 5 tinymce.module \tinymce_perm()
  3. 6 tinymce.module \tinymce_perm()

Implementation of hook_perm().

File

./tinymce.module, line 55
Integrate the TinyMCE editor (http://tinymce.moxiecode.com/) into Drupal.

Code

function tinymce_perm() {
  $array = array(
    'administer tinymce',
    'access tinymce',
  );
  $tinymce_mod_path = drupal_get_path('module', 'tinymce');
  if (is_dir($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/plugins/imagemanager/')) {
    $array[] = 'access tinymce imagemanager';
  }
  if (is_dir($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/plugins/filemanager/')) {
    $array[] = 'access tinymce filemanager';
  }
  return $array;
}