aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-02-07 17:17:38 -0800
committerzotlabs <mike@macgirvin.com>2017-02-07 17:17:38 -0800
commit723b51c931e7365b3c8d531bf25c6c02308cba9f (patch)
tree20e525d00f6483bdd5295a374188de4687d3e142 /Zotlabs
parenta6160e30262107ff73c253ecc46fffaa2986f79b (diff)
downloadvolse-hubzilla-723b51c931e7365b3c8d531bf25c6c02308cba9f.tar.gz
volse-hubzilla-723b51c931e7365b3c8d531bf25c6c02308cba9f.tar.bz2
volse-hubzilla-723b51c931e7365b3c8d531bf25c6c02308cba9f.zip
provide a few system defined permcats; will require a permission editor page to define new (personal) ones.
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Connedit.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php
index 92f4fc345..8f382246a 100644
--- a/Zotlabs/Module/Connedit.php
+++ b/Zotlabs/Module/Connedit.php
@@ -793,6 +793,15 @@ class Connedit extends \Zotlabs\Web\Controller {
$perms[] = array('perms_' . $k, $v, ((array_key_exists($k,$their_perms)) ? intval($their_perms[$k]) : ''),$thisperm, 1, (($checkinherited & PERMS_SPECIFIC) ? '' : '1'), '', $checkinherited);
}
+ $pcat = new \Zotlabs\Lib\Permcat(local_channel());
+ $pcatlist = $pcat->listing();
+ $permcats = [];
+ if($pcatlist) {
+ foreach($pcatlist as $pc) {
+ $permcats[$pc['name']] = $pc['localname'];
+ }
+ }
+
$locstr = '';
$locs = q("select hubloc_addr as location from hubloc left join site on hubloc_url = site_url where hubloc_hash = '%s'
@@ -817,6 +826,7 @@ class Connedit extends \Zotlabs\Web\Controller {
$o .= replace_macros($tpl, [
'$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connection: %s'),$contact['xchan_name'])),
'$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), t('Connection requests will be approved without your interaction'), $yes_no),
+ '$permcat' => [ 'permcat', t('Permission role'), '', '',$permcats ],
'$addr' => $contact['xchan_addr'],
'$section' => $section,
'$sections' => $sections,