aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-17 21:16:15 -0700
committerfriendica <info@friendica.com>2014-09-17 21:16:15 -0700
commit51d9f0d97a186e32aeacc42e3b2d2001d04b5dd2 (patch)
tree52cd6eacf0eb3b78edc815fc91be81ae24399d05 /include/permissions.php
parenteca420ec96912ad573354953297564c9f9ad2c32 (diff)
downloadvolse-hubzilla-51d9f0d97a186e32aeacc42e3b2d2001d04b5dd2.tar.gz
volse-hubzilla-51d9f0d97a186e32aeacc42e3b2d2001d04b5dd2.tar.bz2
volse-hubzilla-51d9f0d97a186e32aeacc42e3b2d2001d04b5dd2.zip
channel permission roles
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;
+}
+