mirror of
https://github.com/YunoHost-Apps/baikal_ynh.git
synced 2024-09-03 18:16:11 +02:00
Update app-add-ldap-auth.patch
This commit is contained in:
parent
866a7c4186
commit
89be38e180
1 changed files with 18 additions and 23 deletions
|
@ -2,10 +2,12 @@ diff --git a/Core/Frameworks/Baikal/Core/Server.php b/Core/Frameworks/Baikal/Cor
|
||||||
index e96fe39..b90b49e 100644
|
index e96fe39..b90b49e 100644
|
||||||
--- a/Core/Frameworks/Baikal/Core/Server.php
|
--- a/Core/Frameworks/Baikal/Core/Server.php
|
||||||
+++ b/Core/Frameworks/Baikal/Core/Server.php
|
+++ b/Core/Frameworks/Baikal/Core/Server.php
|
||||||
@@ -133,6 +133,8 @@ class Server {
|
@@ -133,8 +133,8 @@
|
||||||
|
|
||||||
if ($this->authType === 'Basic') {
|
if ($this->authType === 'Basic') {
|
||||||
$authBackend = new \Baikal\Core\PDOBasicAuth($this->pdo, $this->authRealm);
|
$authBackend = new \Baikal\Core\PDOBasicAuth($this->pdo, $this->authRealm);
|
||||||
|
- } elseif ($this->authType === 'Apache') {
|
||||||
|
- $authBackend = new \Sabre\DAV\Auth\Backend\Apache();
|
||||||
+ } elseif ($this->authType === 'LDAP-UserBind') {
|
+ } elseif ($this->authType === 'LDAP-UserBind') {
|
||||||
+ $authBackend = new \Baikal\Core\LDAPUserBindAuth($this->pdo, $this->authRealm);
|
+ $authBackend = new \Baikal\Core\LDAPUserBindAuth($this->pdo, $this->authRealm);
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,10 +17,14 @@ diff --git a/Core/Frameworks/Baikal/Model/Config/Standard.php b/Core/Frameworks/
|
||||||
index 1ef5a51..32ec217 100644
|
index 1ef5a51..32ec217 100644
|
||||||
--- a/Core/Frameworks/Baikal/Model/Config/Standard.php
|
--- a/Core/Frameworks/Baikal/Model/Config/Standard.php
|
||||||
+++ b/Core/Frameworks/Baikal/Model/Config/Standard.php
|
+++ b/Core/Frameworks/Baikal/Model/Config/Standard.php
|
||||||
@@ -51,6 +51,22 @@ class Standard extends \Baikal\Model\Config {
|
@@ -37,6 +37,26 @@
|
||||||
"type" => "string",
|
"card_enabled" => true,
|
||||||
"comment" => "HTTP authentication type for WebDAV; default Digest"
|
"cal_enabled" => true,
|
||||||
],
|
"dav_auth_type" => "Digest",
|
||||||
|
+ "dav_ldap_uri" => "ldapi:///",
|
||||||
|
+ "dav_ldap_dn_template" => "uid=%n,dc=example,dc=com",
|
||||||
|
+ "dav_ldap_displayname_attr" => "cn",
|
||||||
|
+ "dav_ldap_email_attr" => "mail",
|
||||||
+ "dav_ldap_uri" => [
|
+ "dav_ldap_uri" => [
|
||||||
+ "type" => "string",
|
+ "type" => "string",
|
||||||
+ "comment" => "URI to LDAP Server (for ldap-userbind auth); default ldapi:///"
|
+ "comment" => "URI to LDAP Server (for ldap-userbind auth); default ldapi:///"
|
||||||
|
@ -35,25 +41,14 @@ index 1ef5a51..32ec217 100644
|
||||||
+ "type" => "string",
|
+ "type" => "string",
|
||||||
+ "comment" => "LDAP-attribute for email; default mail"
|
+ "comment" => "LDAP-attribute for email; default mail"
|
||||||
+ ],
|
+ ],
|
||||||
"admin_passwordhash" => [
|
|
||||||
"type" => "string",
|
|
||||||
"comment" => "Baïkal Web admin password hash; Set via Baïkal Web Admin",
|
|
||||||
@@ -64,6 +80,10 @@ class Standard extends \Baikal\Model\Config {
|
|
||||||
"card_enabled" => true,
|
|
||||||
"cal_enabled" => true,
|
|
||||||
"dav_auth_type" => "Digest",
|
|
||||||
+ "dav_ldap_uri" => "ldapi:///",
|
|
||||||
+ "dav_ldap_dn_template" => "uid=%n,dc=example,dc=com",
|
|
||||||
+ "dav_ldap_displayname_attr" => "cn",
|
|
||||||
+ "dav_ldap_email_attr" => "mail",
|
|
||||||
"admin_passwordhash" => "",
|
"admin_passwordhash" => "",
|
||||||
"auth_realm" => "BaikalDAV",
|
"failed_access_message" => "user %u authentication failure for Baikal",
|
||||||
"base_uri" => ""
|
// While not editable as will change admin & any existing user passwords,
|
||||||
@@ -103,7 +123,31 @@ class Standard extends \Baikal\Model\Config {
|
@@ -79,7 +99,31 @@
|
||||||
$oMorpho->add(new \Formal\Element\Listbox([
|
$oMorpho->add(new \Formal\Element\Listbox([
|
||||||
"prop" => "dav_auth_type",
|
"prop" => "dav_auth_type",
|
||||||
"label" => "WebDAV authentication type",
|
"label" => "WebDAV authentication type",
|
||||||
- "options" => ["Digest", "Basic"]
|
- "options" => ["Digest", "Basic", "Apache"],
|
||||||
+ "options" => ["Digest", "Basic", "LDAP-UserBind"]
|
+ "options" => ["Digest", "Basic", "LDAP-UserBind"]
|
||||||
+ ]));
|
+ ]));
|
||||||
+
|
+
|
||||||
|
|
Loading…
Add table
Reference in a new issue