Add config option to exclude fields from auth providers sync
This commit is contained in:
@@ -44,7 +44,7 @@ class UserProperty
|
|||||||
*/
|
*/
|
||||||
public static function filterProperties(array $profile, array $properties)
|
public static function filterProperties(array $profile, array $properties)
|
||||||
{
|
{
|
||||||
$excludedProperties = array('username');
|
$excludedProperties = explode_csv_field(EXTERNAL_AUTH_EXCLUDE_FIELDS);
|
||||||
$values = array();
|
$values = array();
|
||||||
|
|
||||||
foreach ($properties as $property => $value) {
|
foreach ($properties as $property => $value) {
|
||||||
|
|||||||
@@ -149,3 +149,6 @@ defined('HTTP_VERIFY_SSL_CERTIFICATE') or define('HTTP_VERIFY_SSL_CERTIFICATE',
|
|||||||
defined('TOTP_ISSUER') or define('TOTP_ISSUER', 'Kanboard');
|
defined('TOTP_ISSUER') or define('TOTP_ISSUER', 'Kanboard');
|
||||||
|
|
||||||
defined('PROJECT_ACTIVITIES_MAX_EVENTS') or define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
defined('PROJECT_ACTIVITIES_MAX_EVENTS') or define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
||||||
|
|
||||||
|
// Comma separated list of fields to not synchronize when using external authentication providers
|
||||||
|
defined('EXTERNAL_AUTH_EXCLUDE_FIELDS') or define('EXTERNAL_AUTH_EXCLUDE_FIELDS', 'username');
|
||||||
|
|||||||
@@ -240,3 +240,6 @@ define('TOTP_ISSUER', 'Kanboard');
|
|||||||
|
|
||||||
// Maximum number of events stored in the table "project_activities"
|
// Maximum number of events stored in the table "project_activities"
|
||||||
define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
||||||
|
|
||||||
|
// Comma separated list of fields to not synchronize when using external authentication providers
|
||||||
|
define('EXTERNAL_AUTH_EXCLUDE_FIELDS', 'username');
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Config file
|
Config File
|
||||||
===========
|
===========
|
||||||
|
|
||||||
You can customize the default settings of Kanboard by adding a file `config.php` at the project root or in the `data` folder.
|
You can customize the default settings of Kanboard by adding a file `config.php` at the project root or in the `data` folder.
|
||||||
@@ -273,7 +273,7 @@ define('LOG_FILE', __DIR__.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'debug
|
|||||||
```
|
```
|
||||||
|
|
||||||
Brute-force protection
|
Brute-force protection
|
||||||
---------------------
|
----------------------
|
||||||
|
|
||||||
```php
|
```php
|
||||||
// Enable captcha after 3 authentication failure
|
// Enable captcha after 3 authentication failure
|
||||||
@@ -338,4 +338,7 @@ define('TOTP_ISSUER', 'Kanboard');
|
|||||||
|
|
||||||
// Maximum number of events stored in the table "project_activities"
|
// Maximum number of events stored in the table "project_activities"
|
||||||
define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000);
|
||||||
|
|
||||||
|
// Comma separated list of fields to not synchronize when using external authentication providers
|
||||||
|
define('EXTERNAL_AUTH_EXCLUDE_FIELDS', 'username');
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -194,6 +194,18 @@ Just change the value of `LDAP_ACCOUNT_CREATION` to `false`:
|
|||||||
define('LDAP_ACCOUNT_CREATION', false);
|
define('LDAP_ACCOUNT_CREATION', false);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Synchronization
|
||||||
|
---------------
|
||||||
|
|
||||||
|
By default, Kanboard will synchronize all fields (role, name, email...) except the username.
|
||||||
|
|
||||||
|
If you would like to change this behavior, use this config parameter:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
// This example will not synchronize the fields "username" and "role" from LDAP to Kanboard.
|
||||||
|
define('EXTERNAL_AUTH_EXCLUDE_FIELDS', 'username,role');
|
||||||
|
```
|
||||||
|
|
||||||
Troubleshooting
|
Troubleshooting
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user