diff options
author | redmatrix <mike@macgirvin.com> | 2016-08-31 19:55:45 -0700 |
---|---|---|
committer | redmatrix <mike@macgirvin.com> | 2016-08-31 19:55:45 -0700 |
commit | 4bdb02849980982f0e1f3cccc12386c2a800f0bd (patch) | |
tree | 55305053dbbe227eeda3f7a18d1041a99c0d9650 /Zotlabs/Module/Register.php | |
parent | d18a8e849e5cd3b34ce53a2ea57a7ec8da86b829 (diff) | |
download | volse-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/Register.php')
-rw-r--r-- | Zotlabs/Module/Register.php | 15 |
1 files changed, 10 insertions, 5 deletions
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, |