From 4d689f85394c6927a1401c4c6c4fc0df82dbcc9a Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Fri, 6 Jan 2017 14:59:04 +0100 Subject: [PATCH] Create configured default relationships from all drivers as well as for internal auth (closes: #75) previously, this was only usable with the LDAP driver --- inc/auth-functions.php | 1 + inc/drivers_imap_pam.php | 1 + inc/drivers_pwauth_pam.php | 1 + inc/drivers_rimap.php | 1 + inc/drivers_squid_pam.php | 1 + inc/ui/principal-edit.php | 1 + 6 files changed, 6 insertions(+) diff --git a/inc/auth-functions.php b/inc/auth-functions.php index 1adfd870..6ec757d3 100644 --- a/inc/auth-functions.php +++ b/inc/auth-functions.php @@ -361,6 +361,7 @@ EOERRMSG; else { $principal->Create($usr); CreateHomeCollections($username); + CreateDefaultRelationships($username); } /** diff --git a/inc/drivers_imap_pam.php b/inc/drivers_imap_pam.php index 970c782c..68ab8c97 100644 --- a/inc/drivers_imap_pam.php +++ b/inc/drivers_imap_pam.php @@ -108,6 +108,7 @@ function IMAP_PAM_check($username, $password ){ return false; } CreateHomeCollections($username); + CreateDefaultRelationships($username); } return $principal; } diff --git a/inc/drivers_pwauth_pam.php b/inc/drivers_pwauth_pam.php index ed5ef089..d7e13755 100644 --- a/inc/drivers_pwauth_pam.php +++ b/inc/drivers_pwauth_pam.php @@ -80,6 +80,7 @@ function PWAUTH_PAM_check($username, $password) { return false; } CreateHomeCollections($username); + CreateDefaultRelationships($username); } return $principal; break; diff --git a/inc/drivers_rimap.php b/inc/drivers_rimap.php index 762254ed..3b2d3a75 100644 --- a/inc/drivers_rimap.php +++ b/inc/drivers_rimap.php @@ -100,6 +100,7 @@ function RIMAP_check($username, $password ){ return false; } CreateHomeCollections($username); + CreateDefaultRelationships($username); } return $principal; } diff --git a/inc/drivers_squid_pam.php b/inc/drivers_squid_pam.php index 9892308e..d3a23610 100644 --- a/inc/drivers_squid_pam.php +++ b/inc/drivers_squid_pam.php @@ -71,6 +71,7 @@ function SQUID_PAM_check($username, $password ){ return false; } CreateHomeCollections($username); + CreateDefaultRelationships($username); } return $principal; } diff --git a/inc/ui/principal-edit.php b/inc/ui/principal-edit.php index f2961057..4557af83 100644 --- a/inc/ui/principal-edit.php +++ b/inc/ui/principal-edit.php @@ -238,6 +238,7 @@ function principal_editor() { /** We only add the default calendar if it isn't a group, and this is a create action */ require_once('auth-functions.php'); CreateHomeCollections($editor->Value('username')); + CreateDefaultRelationships($editor->Value('username')); } if ( $session->AllowedTo('Admin') ) { if ( $_POST['is_admin'] == 'on' ) {