From d45d11ab868ec3def19211f12b36582e6fea7ff8 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 22 Mar 2007 10:27:18 +0000 Subject: [PATCH] Improve usability by removing possibly dangerous options from personal configuration and moving them to the user management. Also rename the description options for those options. Thanks to lendulado from the forums for these suggestions. --- docs/NEWS | 5 +++++ include/admin/plugins.inc.php | 4 ++++ include/admin/users.inc.php | 7 ++++--- include/functions_installer.inc.php | 15 +++++++++----- include/tpl/config_personal.inc.php | 31 +++++++++++++++++++++++------ 5 files changed, 48 insertions(+), 14 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 6d9f381..e80a372 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,11 @@ Version 1.2 () ------------------------------------------------------------------------ + * Move possible hazardous personal configuration options ("Rights: + Publishing entries", "Forbid creating entries", "Access level"; + "Group memberships") to the user management section. + (garvinhicking) + * Fix track exit url ids off by one when being used in conjunction with caching plugin (garvinhicking) diff --git a/include/admin/plugins.inc.php b/include/admin/plugins.inc.php index baa669f..cfb0628 100644 --- a/include/admin/plugins.inc.php +++ b/include/admin/plugins.inc.php @@ -493,6 +493,10 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { +

Memory Usage

+
+
+
- [] + [] - [] @@ -232,12 +232,13 @@ if ( ($serendipity['GET']['adminAction'] == 'edit' && serendipity_checkPermissio


-
+

'; $user = serendipity_fetchUsers($serendipity['GET']['userid']); $group_intersect = serendipity_intersectGroup($user[0]['authorid']); @@ -271,7 +272,7 @@ if (!empty($serendipity['GET']['userid'])) { $from['groups'] = array(); } -serendipity_printConfigTemplate($config, $from, true, false); +serendipity_printConfigTemplate($config, $from, true, false, true, true); if ($serendipity['GET']['adminAction'] == 'edit') { ?> diff --git a/include/functions_installer.inc.php b/include/functions_installer.inc.php index 08be1ba..897c345 100644 --- a/include/functions_installer.inc.php +++ b/include/functions_installer.inc.php @@ -451,9 +451,10 @@ function serendipity_guessInput($type, $name, $value='', $default='') { * @param boolean If true, no HTML FORM container will be emitted * @param boolean If true, the configuration sections will all be folded * @param boolean If true, the user can turn config sections on and off + * @param boolean If true, the user can NOT display possibly dangerous options * @return null */ -function serendipity_printConfigTemplate($config, $from = false, $noForm = false, $folded = true, $allowToggle = true) { +function serendipity_printConfigTemplate($config, $from = false, $noForm = false, $folded = true, $allowToggle = true, $showDangerous = false) { global $serendipity; if ( $allowToggle ) { ?> @@ -518,7 +519,7 @@ function showConfigAll(count) { ?> - + +/-  @@ -536,7 +537,7 @@ function showConfigAll(count) { USERCONF_USERLEVEL_DESC . "\n" . USERLEVEL_OBSOLETE, 'type' => 'list', 'default' => $serendipity['permissionLevels'], - 'permission' => 'personalConfigurationUserlevel'), + 'permission' => 'personalConfigurationUserlevel', + 'view' => 'dangerous'), array('var' => 'groups', 'title' => USERCONF_GROUPS, 'description' => USERCONF_GROUPS_DESC, 'type' => 'multilist', 'permission' => array('adminUsersMaintainOthers', 'adminUsersMaintainSame'), - 'perm_mode' => 'or', + 'perm_mode' => 'or', 'default' => serendipity_getAllGroups(), - 'flags' => array('groups')), + 'flags' => array('groups'), + 'view' => 'dangerous'), array('var' => 'email', 'title' => USERCONF_EMAIL, @@ -75,6 +77,14 @@ 'permission' => 'personalConfiguration', 'flags' => array('config')), + array('var' => 'eyecandy', + 'title' => PREFERENCE_USE_JS, + 'description' => PREFERENCE_USE_JS_DESC, + 'type' => 'bool', + 'default' => true, + 'permission' => 'personalConfiguration', + 'flags' => array('config')), + array('var' => 'mail_comments', 'title' => USERCONF_SENDCOMMENTS, 'description' => USERCONF_SENDCOMMENTS_DESC, @@ -95,14 +105,16 @@ 'type' => 'bool', 'default' => false, 'permission' => 'personalConfigurationNoCreate', - 'flags' => array('config')), + 'flags' => array('config'), + 'view' => 'dangerous'), array('var' => 'right_publish', 'title' => USERCONF_ALLOWPUBLISH, 'description' => USERCONF_ALLOWPUBLISH_DESC, 'type' => 'bool', 'default' => true, - 'permission' => 'personalConfigurationRightPublish') + 'permission' => 'personalConfigurationRightPublish', + 'view' => 'dangerous') )); $res['defaults'] = @@ -132,7 +144,14 @@ 'default' => array('publish' => PUBLISH, 'draft' => DRAFT), 'permission' => 'personalConfiguration', 'flags' => array('config')), + + array('var' => 'showMediaToolbar', + 'title' => SHOW_MEDIA_TOOLBAR, + 'description' => '', + 'type' => 'bool', + 'default' => false, + 'permission' => 'personalConfiguration', + 'flags' => array('config')), )); return $res; -?> -- 2.39.5