diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-09 01:33:51 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-09 01:33:51 +1000 |
| commit | eea4e42609e319b38f14bca9f31cc3327ffaf175 (patch) | |
| tree | 50eff229bcb7314e6f22837f1046a151adf3ddf7 /inc/config.php | |
| parent | 9a846d5ad5838d4db824623d9916d6b4e34c29ee (diff) | |
Add ability to create custom user/permissions groups
Diffstat (limited to 'inc/config.php')
| -rw-r--r-- | inc/config.php | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/inc/config.php b/inc/config.php index 84222009..897c8a42 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1162,18 +1162,28 @@ * ==================== */ - // Probably best not to change these: - if (!defined('JANITOR')) { - define('JANITOR', 0, true); - define('MOD', 1, true); - define('ADMIN', 2, true); - define('DISABLED', 3, true); - } + // Probably best not to change this unless you are smart enough to figure out what you're doing. If you + // decide to change it, remember that it is impossible to redefinite/overwrite groups; you may only add + // new ones. + $config['mod']['groups'] = array( + 10 => 'Janitor', + 20 => 'Mod', + 30 => 'Admin', + // 98 => 'God', + 99 => 'Disabled' + ); + + // If you add stuff to the above, you'll need to call this function immediately after. + define_groups(); + + // Example: Adding a new permissions group. + // $config['mod']['groups'][0] = 'NearlyPowerless'; + // define_groups(); // Capcode permissions. $config['mod']['capcode'] = array( // JANITOR => array('Janitor'), - MOD => array('Mod'), + MOD => array('Mod'), ADMIN => true ); @@ -1312,18 +1322,14 @@ $config['mod']['edit_config'] = ADMIN; // Config editor permissions - $config['mod']['config'] = array( - JANITOR => false, - MOD => false, - ADMIN => false, - DISABLED => false, - ); + $config['mod']['config'] = array(); // Disable the following configuration variables from being changed via ?/config. The following default // banned variables are considered somewhat dangerous. $config['mod']['config'][DISABLED] = array( 'mod>config', 'mod>config_editor_php', + 'mod>groups', 'convert_args', 'db>password', ); |
