channel permission roles
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user