aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/New_channel.php9
-rw-r--r--Zotlabs/Module/Register.php15
-rw-r--r--Zotlabs/Module/Settings.php8
3 files changed, 23 insertions, 9 deletions
diff --git a/Zotlabs/Module/New_channel.php b/Zotlabs/Module/New_channel.php
index 26883b6e2..8e6fd1d37 100644
--- a/Zotlabs/Module/New_channel.php
+++ b/Zotlabs/Module/New_channel.php
@@ -125,11 +125,16 @@ class New_channel extends \Zotlabs\Web\Controller {
}
}
+ $privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "" );
+
+ $perm_roles = \Zotlabs\Access\PermissionRoles::roles();
+ if((get_account_techlevel() < 4) && $privacy_role !== 'custom')
+ unset($perm_roles[t('Other')]);
+
$name = array('name', t('Name or caption'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group"'), "*");
$nickhub = '@' . \App::get_hostname();
$nickname = array('nickname', t('Choose a short nickname'), ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''), sprintf( t('Your nickname will be used to create an easy to remember channel address e.g. nickname%s'), $nickhub), "*");
- $privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "" );
- $role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/roles" target="_blank">' . t('Read more about roles') . '</a>',get_roles());
+ $role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/roles" target="_blank">' . t('Read more about roles') . '</a>',$perm_roles);
$o = replace_macros(get_markup_template('new_channel.tpl'), array(
'$title' => t('Create Channel'),
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php
index 0b16d4a66..1d8944d8e 100644
--- a/Zotlabs/Module/Register.php
+++ b/Zotlabs/Module/Register.php
@@ -174,7 +174,7 @@ class Register extends \Zotlabs\Web\Controller {
- function get() {
+ function get() {
$registration_is = '';
$other_sites = '';
@@ -205,6 +205,12 @@ class Register extends \Zotlabs\Web\Controller {
return;
}
}
+
+ $privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "");
+
+ $perm_roles = \Zotlabs\Access\PermissionRoles::roles();
+ if((get_account_techlevel() < 4) && $privacy_role !== 'custom')
+ unset($perm_roles[t('Other')]);
// Configurable terms of service link
@@ -231,8 +237,7 @@ class Register extends \Zotlabs\Web\Controller {
$name = array('name', t('Name or caption'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group"'));
$nickhub = '@' . str_replace(array('http://','https://','/'), '', get_config('system','baseurl'));
$nickname = array('nickname', t('Choose a short nickname'), ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''), sprintf( t('Your nickname will be used to create an easy to remember channel address e.g. nickname%s'), $nickhub));
- $privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "");
- $role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/roles" target="_blank">' . t('Read more about roles') . '</a>',get_roles());
+ $role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/roles" target="_blank">' . t('Read more about roles') . '</a>',$perm_roles);
$tos = array('tos', $label_tos, '', '', array(t('no'),t('yes')));
$server_role = get_config('system','server_role');
@@ -254,11 +259,11 @@ class Register extends \Zotlabs\Web\Controller {
'$invite_code' => $invite_code,
'$auto_create' => $auto_create,
'$name' => $name,
- '$role' => $role,
+ '$role' => $role,
'$default_role' => $default_role,
'$nickname' => $nickname,
'$enable_tos' => $enable_tos,
- '$tos' => $tos,
+ '$tos' => $tos,
'$email' => $email,
'$pass1' => $password,
'$pass2' => $password2,
diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php
index 847f64da9..dedfdda86 100644
--- a/Zotlabs/Module/Settings.php
+++ b/Zotlabs/Module/Settings.php
@@ -1238,7 +1238,11 @@ class Settings extends \Zotlabs\Web\Controller {
$permissions_role = 'custom';
$permissions_set = (($permissions_role != 'custom') ? true : false);
-
+
+ $perm_roles = \Zotlabs\Access\PermissionRoles::roles();
+ if((get_account_techlevel() < 4) && $permissions_role !== 'custom')
+ unset($perm_roles[t('Other')]);
+
$vnotify = get_pconfig(local_channel(),'system','vnotify');
$always_show_in_notices = get_pconfig(local_channel(),'system','always_show_in_notices');
if($vnotify === false)
@@ -1289,7 +1293,7 @@ class Settings extends \Zotlabs\Web\Controller {
'$deny_gid' => acl2json($perm_defaults['deny_gid']),
'$suggestme' => $suggestme,
'$group_select' => $group_select,
- '$role' => array('permissions_role' , t('Channel permissions category:'), $permissions_role, '', get_roles()),
+ '$role' => array('permissions_role' , t('Channel permissions category:'), $permissions_role, '', $perm_roles),
'$profile_in_dir' => $profile_in_dir,
'$hide_friends' => $hide_friends,