aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/New_channel.php
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-08-31 19:55:45 -0700
committerredmatrix <mike@macgirvin.com>2016-08-31 19:55:45 -0700
commit4bdb02849980982f0e1f3cccc12386c2a800f0bd (patch)
tree55305053dbbe227eeda3f7a18d1041a99c0d9650 /Zotlabs/Module/New_channel.php
parentd18a8e849e5cd3b34ce53a2ea57a7ec8da86b829 (diff)
downloadvolse-hubzilla-4bdb02849980982f0e1f3cccc12386c2a800f0bd.tar.gz
volse-hubzilla-4bdb02849980982f0e1f3cccc12386c2a800f0bd.tar.bz2
volse-hubzilla-4bdb02849980982f0e1f3cccc12386c2a800f0bd.zip
Hubzilla pro: Don't offer 'custom/expert' permissions below a techlevel of 4; but any existing expert mode members are grandfathered in.
Diffstat (limited to 'Zotlabs/Module/New_channel.php')
-rw-r--r--Zotlabs/Module/New_channel.php9
1 files changed, 7 insertions, 2 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'),