--- old.txt Sat Feb 26 17:34:41 2005 +++ new.txt Sat Feb 26 18:02:36 2005 @@ -109,8 +109,9 @@ return $items; } +/* Permission by Role Patch- neofactor FEB 2005 */ function htmlarea_perm() { - return array("upload images"); + return array("upload images", "use htmlarea"); } function htmlarea_textarea($op, $name) { @@ -170,7 +171,8 @@ function htmlarea_user($type, $edit, &$user, $category = NULL) { switch ($type) { case "form": - if ($category == 'account') { + /* Permission by Role Patch- neofactor FEB 2005 */ + if ( ($category == 'account') && (user_access('use htmlarea')) ) { $output = form_checkbox(t('Enable rich text editor while authoring'), 'htmlarea_isenabled', 1, isset($user->htmlarea_isenabled) ? $user->htmlarea_isenabled : 1); return array(array ('title' => t('text area settings'), 'data' => $output)); } @@ -774,6 +776,10 @@ if (_htmlarea_bad_browser() || (isset($user->htmlarea_isenabled) && $user->htmlarea_isenabled == 0)) { return false; } + + /* Permission by Role Patch- neofactor FEB 2005 */ + if (!user_access('use htmlarea')) { return false; } + $path = _htmlarea_get_path(); if ($name == "") {