summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add a comment explaining how Helper::loginName2UserName can workCôme Chilliet2022-02-081-2/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Improve typing in OCA\User_LDAP\Access and reduce psalm errorsCôme Chilliet2022-02-083-66/+44
| | | | | | | | | | | | | | This should avoid some PHP warning using PHP 8.1 and help detecting type trouble early in the future. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix psalm errors in apps/user_ldap/lib/Jobs/CleanUp.phpCôme Chilliet2022-02-101-26/+14
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix ldap:update-uuidCôme Chilliet2022-02-103-21/+30
| | | | | | | | | | | | | | | | Generators cannot be iterated with while or returned by an other generator, using foreach instead. And a few other problems. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | add occ command to update UUIDs (incomplete)Arthur Schiwon2022-02-102-24/+398
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | allow to re-run migration step when backup DB is already createdArthur Schiwon2022-02-101-1/+12
| | | | | | | | | | | | - to heal incomplete states from broken upgrades Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | invalidated duplicated UUIDs prior to migration changeArthur Schiwon2022-02-101-0/+90
| | | | | | | | | | | | | | | | - in a proper setup there are no duplicated UUIDs - not all setups are proper - log warning to admin Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix overwriting of SUCCESS and INVALID constsArthur Schiwon2022-02-031-6/+6
|/ | | | | | - already defined in Symfony\Component\Console\Command\Command Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove useless indexes with duplicated names on backup tableCôme Chilliet2022-01-131-2/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix user_ldap migration for long DNs supportCôme Chilliet2022-01-132-49/+31
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Move duplicated code to a base class for group_mapping migrationsCôme Chilliet2022-01-133-79/+72
| | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com> Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
* Split dropTable and createTable in two migrationsCôme Chilliet2022-01-133-48/+141
| | | | | | It is not possible to drop and create the same table in one migration Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix primary key change in user_ldap migrationCôme Chilliet2022-01-133-2/+244
| | | | | | | Use a backup table to copy the data, drop table and recreate it with correct primary key, then copy the data back and drop the backup table. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix a few psalm issues and moved back to psalm/phar 4.18Carl Schwan2022-01-121-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Improve ldap:test-config occ commandCôme Chilliet2022-01-041-21/+46
| | | | | | | | Test a search on the base, as the settings wizard is doing. This is to avoid the wizard saying the base is wrong and the command saying everything is fine. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #30299 from nextcloud/fix/log_filesJohn Molakvoæ2021-12-201-1/+1
|\
| * Check if directoy is writable instead of possibly missing fileCarl Schwan2021-12-201-1/+1
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Merge pull request #29329 from nextcloud/fix/noid/groups-unwarranted-membersJohn Molakvoæ2021-12-201-2/+14
|\ \
| * | fix potential unwarranted memberships in nested groups from LDAPArthur Schiwon2021-11-191-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - the issue was present only when using PHP based resolving of nested group members. Normally nested members are common in AD (and Samba4) and are resolved per LDAP_MATCHING_RULE_IN_CHAIN by default - resolving nested members is recursive - when the cache entry was created it happend for intermediate groups, too, containing members from the parent group - the check was added to only cache the root group with its members - a runtime cache stores intermediate ldap read results Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | | Fix LDAP related docblocks typesCôme Chilliet2021-12-161-1/+1
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | | Fix PHP 8.1 support for user_ldap applicationCôme Chilliet2021-12-1616-128/+93
| |/ |/| | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Add missing copyright headers in migration stepsCôme Chilliet2021-12-092-0/+44
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #29523 from nextcloud/fix/support-ldap-long-dnsJohn Molakvoæ2021-12-094-33/+211
|\ \
| * | Use clearer names for variablesCôme Chilliet2021-11-232-34/+34
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Add an index for directory_uuid as wellCôme Chilliet2021-11-232-0/+10
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Make sure that hash function returns a stringCôme Chilliet2021-11-231-1/+6
| | | | | | | | | | | | | | | | | | | | | The documentation says it can return false, and even if that is highly unlikely for sha256, better safe than sorry. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Add the columns and alter the index in Version1010Date20200630192842Côme Chilliet2021-11-231-3/+11
| | | | | | | | | | | | | | | | | | | | | This is to ensure new installations do not need to go through migration history. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Fixes in migration stepCôme Chilliet2021-11-231-3/+2
| | | | | | | | | | | | | | | | | | | | | We cannot set ldap_dn_hash column as notnull because it is empty for existing users before postSchemaChange is called Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Put back length check to have a clear errorCôme Chilliet2021-11-231-0/+11
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Fixed migration step for user_ldapCôme Chilliet2021-11-231-2/+2
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Fix variable namesJoas Schilling2021-11-231-2/+2
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * | Change column names to ldap_dn and ldap_dn_hash and add migrationCôme Chilliet2021-11-233-29/+158
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Support LDAP dns longer than 255 charactersCôme Chilliet2021-11-232-27/+43
| |/ | | | | | | | | | | | | | | | | Adds an ldap_full_dn column to store the dn, and only store a sha256 hash in the ldap_dn which is shorter and can be indexed without trouble. Migration still needs to be implemented. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Allow to log DB, redis and LDAP requests into filesJoas Schilling2021-12-013-4/+23
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #29470 from nextcloud/fix/translit-php8blizzz2021-11-291-6/+9
|\ \ | | | | | | Avoid use of iconv to get rid of unicode
| * | Fix sanitizing regex and add a test case for uppercase in usernameCôme Chilliet2021-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | I did not find any test data that would fail with the previous regex, but still added data with uppercase to at least test that. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Avoid use of iconv to get rid of unicodeCôme Chilliet2021-10-281-6/+9
| |/ | | | | | | | | | | | | | | Using iconv for translit depends upon server configuration, locale, and PHP version. Using htmlentities instead to have a consistent behavior independent of configuration. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #29837 from nextcloud/fix/user_ldap-check-cacheJulius Härtl2021-11-253-16/+30
|\ \
| * | Check LDAP upon user deletion instead of refusing based on cached informationCôme Chilliet2021-11-231-7/+21
| | | | | | | | | | | | | | | | | | | | | This should avoid having to wait for background job to run after deleting a user in LDAP before being able to delete it in Nextcloud. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Ignore cache in occ ldap:check-ldap commandCôme Chilliet2021-11-223-9/+9
| |/ | | | | | | | | | | | | | | | | This avoids having to wait or reset the cache after deleting a user in the LDAP. This also fixes a PHP error when running ldap:check-ldap --update on a deleted but cached user. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #29610 from nextcloud/fix/user_ldap-loggerCôme Chilliet2021-11-234-68/+20
|\ \ | | | | | | Get rid of user_ldap LogWrapper and use LoggerInterface
| * | Move back logger to protected in OCA\User_LDAP\User\UserCôme Chilliet2021-11-231-1/+1
| | | | | | | | | | | | | | | | | | It was changed to private because of a bad copy/paste. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Get rid of LogWrapper calling deprecated logger and use LoggerInterface from ↵Côme Chilliet2021-11-094-68/+20
| |/ | | | | | | | | | | PSR instead Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* / Make sure mapping cache is cleared when deleting a userCôme Chilliet2021-11-221-0/+5
|/ | | | | | This avoids phantom remnants staying after user deletion Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #29240 from nextcloud/work/admin-delegation-implementationCarl Schwan2021-10-152-6/+19
|\ | | | | Add support for Delegation Settings for more apps
| * Add support for Delegation Settings for more appsCarl Schwan2021-10-152-6/+19
| | | | | | | | | | | | | | | | | | * This adds support for the sharing, groupware, theming and user_ldap app * This adds some code who disapeared during a rebase in the initial delegation PR (provisioning_api) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Use Psr\Log\LoggerInterface where it can easily be used in user_ldapCôme Chilliet2021-10-145-78/+136
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix two mistakes in previous migration to LoggerInterface in ↵Côme Chilliet2021-10-141-1/+1
| | | | | | | | | | | | OCA\User_LDAP\Access Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Use Psr\Log\LoggerInterface in OCA\User_LDAP\AccessCôme Chilliet2021-10-124-32/+55
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Avoid PHP errors when the LDAP attribute is not foundCôme Chilliet2021-10-121-1/+5
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>