aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/permissions.php')
-rw-r--r--include/permissions.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/permissions.php b/include/permissions.php
index 0e213a208..932ae897b 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -528,7 +528,7 @@ function get_role_perms($role) {
break;
- case 'forum_public':
+ case 'forum':
$ret['perms_auto'] = true;
$ret['default_collection'] = false;
$ret['directory_publish'] = true;
@@ -719,3 +719,28 @@ function get_role_perms($role) {
}
+function role_selector($current) {
+ $roles = array(
+ 'social' => array( t('Social Networking'),
+ array('social' => t('Mostly Public'), 'social_restricted' => t('Restricted'), 'social_private' => t('Private'))),
+ 'forum' => array( t('Community Forum'),
+ array('forum' => t('Mostly Public'), 'forum_restricted' => t('Restricted'), 'forum_private' => t('Private'))),
+ 'feed' => array( t('Feed Republish'),
+ array('feed' => t('Mostly Public'), 'feed_restricted' => t('Restricted'))),
+ 'soapbox' => array( t('Celebrity/Soapbox'),
+ array('soapbox' => t('Mostly Public'))),
+ 'other' => array( t('Other'),
+ array('custom' => t('Custom/Expert Mode'))));
+ $o = '<select name="permissions_role" id="privacy-role-select">';
+ foreach($roles as $k => $v) {
+ $o .= '<optgroup label="'. htmlspecialchars($v[0]) . '" >';
+ foreach($v[1] as $kk => $vv) {
+ $selected = (($kk === $current) ? ' selected="selected" ' : '');
+ $o .= '<option value="' . $kk . '" ' . $selected . '>' . htmlspecialchars($vv) . '</option>';
+ }
+ $o .= '<optgroup>';
+ }
+ $o .= '</select>';
+ return $o;
+}
+