Commit Graph

355 Commits

Author SHA1 Message Date
Arthur Schiwon f28235a7ef fix retrieval of user groups 2015-01-12 16:25:11 +01:00
Lukas Reschke a5099b01f9 Merge pull request #12984 from owncloud/ldap-user-cleanup-master
Ldap user cleanup master
2015-01-09 10:47:02 +01:00
Arthur Schiwon c1a79d24c5 fix order of initalizing instance properties, and paremeter order in a method call 2015-01-08 17:45:07 +01:00
Arthur Schiwon c7f273040e fix table name for getList 2015-01-08 14:21:40 +01:00
Arthur Schiwon 9668405ec7 doc fixes and removal of unnecessary use statements 2015-01-07 13:28:56 +01:00
Arthur Schiwon b9235e2a24 inject DB Connection to user manager 2015-01-07 00:52:18 +01:00
Arthur Schiwon 40ecd30fba inject oc config to User_LDAP 2015-01-06 23:28:49 +01:00
Arthur Schiwon e724b78694 smaller fixes: coding style, PHPdoc, typos and few for DI 2015-01-06 17:50:06 +01:00
Lyonel Vincent f94b300602 Be less verbose when using a paged search
Lower the priority from INFO to DEBUG
2014-12-24 16:35:36 +01:00
Lyonel Vincent 5a00b33a90 Be less verbose when disabling SSL cert validation
change log level from WARN to DEBUG
2014-12-24 16:32:27 +01:00
Arthur Schiwon 61ed363f82 planned refactorings for OC 8 2014-12-20 18:28:29 +01:00
Arthur Schiwon 3ca70d647a move from \OC\Preferences to \OCP\IConfig 2014-12-20 16:33:37 +01:00
Arthur Schiwon 144d95de7d basic adjustments for OC 8. I.e. no visible issues, LDAP tests pass. 2014-12-20 16:09:04 +01:00
Arthur Schiwon 4fa39250e7 LDAP User Cleanup: Port from stable7 without further adjustements
LDAP User Cleanup

background job for user clean up

adjust user backend for clean up

register background job

remove dead code

dependency injection

make Helper non-static for proper testing

check whether it is OK to run clean up job. Do not forget to pass arguments.

use correct method to get the config from server

methods can be private, proper indirect testing is given

no automatic user deletion

make limit readable for test purposes

make method less complex

add first tests

let preferences accept limit and offset for getUsersForValue

DI via constructor does not work for background jobs

after detecting, now we have retrieving deleted users and their details

we need this method to be public for now

finalize export method, add missing getter

clean up namespaces and get rid of unnecessary files

helper is not static anymore

cleanup according to scrutinizer

add cli tool to show deleted users

uses are necessary after recent namespace change

also remove user from mappings table on deletion

add occ command to delete users

fix use statement

improve output

big fixes / improvements

PHP doc

return true in userExists early for cleaning up deleted users

bump version

control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default.

improve doc

rename cli method to be consistent with  others

introduce ldapUserCleanupInterval in sample config

don't show last login as unix epoche start when no  login happend

less log output

consistent namespace for OfflineUser

rename GarbageCollector to DeletedUsersIndex and move it to user subdir

fix unit tests

add tests for deleteUser

more test adjustements

Conflicts:
	apps/user_ldap/ajax/clearMappings.php
	apps/user_ldap/appinfo/app.php
	apps/user_ldap/lib/access.php
	apps/user_ldap/lib/helper.php
	apps/user_ldap/tests/helper.php
	core/register_command.php
	lib/private/preferences.php
	lib/private/user.php

add ldap:check-user to check user existance on the fly

Conflicts:
	apps/user_ldap/lib/helper.php

forgotten file

PHPdoc fixes, no code change

and don't forget to adjust tests
2014-12-19 19:47:54 +01:00
Arthur Schiwon ec0f80fee9 Split mapping from Access and Helper classes into it's own. Fully test them, too.
remove unused methods

split mapping methods off from Access class

fix DB query handling

move 'clear mapping' methods from static helper to new mapping class

add tests

test directly with DB

finishing tests and fix return value from setDNbyUUID

add corresponding class for groups and make abstract test class neutral. helper tests is now obsolete as the tested functions were moved to the new mapper class.

add missing info to PHPDoc

add unmap method

fix namespaces

fix test inheritance

PHPDoc and a small code restructure for scrutinizer, no effective changes

PostgreSQL does not accept LIMIT in DELETE queries

phpdoc fixes, no code changes
2014-12-19 18:26:12 +01:00
Morris Jobke d41082f4d6 first step to drop \OCP\Config:: in favour of IConfig 2014-12-17 11:12:37 +01:00
Arthur Schiwon 0577bb569a add doc 2014-12-08 17:22:52 +01:00
Arthur Schiwon 45443ee28c preserve an asterisk at the start when escaping a search term 2014-12-08 17:19:57 +01:00
Arthur Schiwon ee168a121d Forward port of #12493
add ldap-search command to occ

Conflicts:
	apps/user_ldap/appinfo/register_command.php

LDAP search filter creation changes:

1. do not prepend * wildcard to search terms. Will result in faster search, but
you don't find "foobar"  when looking for "bar"
2. advanced behaviour when search string contains a space and multiple search
attributes are present. The search string is split into single words. The
resulting filter requires that each word at least appears once in any search
attribute. This is supposed to return better results in big LDAPs.

trim search string before passing it on
2014-12-04 19:02:09 +01:00
Arthur Schiwon c07c338c90 fix counting when ldapPagingSize is 0 2014-11-21 14:51:20 +01:00
Arthur Schiwon 6b6147dafd phpdoc and mixed up letters 2014-11-20 18:31:40 +01:00
Arthur Schiwon 4a3fe42b16 a corrected email attribute needs to be saved, not only returned 2014-11-20 18:31:39 +01:00
Arthur Schiwon f9b4f5f4e5 to reassure that selected attributes still work, do not count all matching entries but limit it to 1 in order to make it faster 2014-11-20 18:31:39 +01:00
Arthur Schiwon 71944a59a5 detectors (email, displayname..) are now started in one place, triggered from only 2 places. more reliable structure and flow, saves requests 2014-11-20 18:31:39 +01:00
Arthur Schiwon f725cc66a3 consolidate user count filter in wizard and user back end 2014-11-20 18:31:39 +01:00
Arthur Schiwon cb3af1dce2 detect user display name attribute and return user count depending on its presence 2014-11-20 18:31:39 +01:00
Morris Jobke 081787d6ae Fix infinite loop if count and limit is 0
* otherwise it will always think it hits the limit and need another round to fetch additional results
2014-11-11 12:15:30 +01:00
blizzz b26f11c16f Merge pull request #11362 from mark0n/rm_ldap_conf_cli
Add a CLI command that deletes an LDAP config
2014-11-04 13:19:45 +01:00
blizzz dc9ea893fd Merge pull request #11172 from owncloud/user-ldap-no-bcmath
Fix ldap convertSID2Str() / Remove BCMath dependency
2014-11-03 14:03:26 +01:00
Andreas Fischer d1410b46a9 user_ldap: Reimplement convertSID2Str() without BCMath dependency.
Also explicitly format sub-id integers as unsigned, which is required for
32-bit systems.
2014-11-03 12:07:53 +01:00
Lukas Reschke d060180140 Use function outside of loop
Otherwise the function is executed n times which is a lot of overhead
2014-10-24 12:27:53 +02:00
Arthur Schiwon 4e8c7570d4 make performance less bad. Still far from good, but at least it works 2014-10-17 20:16:04 +02:00
blizzz 8553e04a78 Merge pull request #11478 from owncloud/fix-11448
LDAP: add setting to wizard that disables auto-detection and enables raw mode
2014-10-16 15:35:30 +02:00
Arthur Schiwon ab3535855f more beautiful white spaces 2014-10-08 15:04:29 +02:00
Arthur Schiwon 67292a5345 add checkbox for experienced users to server tab 2014-10-07 16:43:58 +02:00
Arthur Schiwon 6c502e11f8 make scrutinizer happy, very minor changes 2014-10-01 11:55:53 +02:00
Arthur Schiwon f9e085b020 init a new paged search on read operations to satisfy OpenLDAP 2014-09-30 17:00:25 +02:00
Arthur Schiwon 2b9696efae abandond paged search only if PHP supports them 2014-09-30 13:13:52 +02:00
Arthur Schiwon 53ec32807a abandon ongoing paged search before starting a new one 2014-09-30 12:42:37 +02:00
Arthur Schiwon 9a63693227 properly cancel a Paginated Results operation in order to avoid protocol errors, fixes #10526 2014-09-30 12:42:37 +02:00
Martin Konrad fd9b79b218 Add a CLI command that deletes an LDAP config
With this change LDAP configurations can be managed completely from
the command line.
2014-09-30 03:23:00 +02:00
Arthur Schiwon 6041ae6224 dn needs to be fetched to be able to detect memberOf support 2014-09-26 15:36:49 +02:00
Lukas Reschke 45b17207cc Merge pull request #10745 from owncloud/fix-10708-doctrine
Use Doctrine Platform to generate SQL query for table truncation.
2014-09-16 23:56:20 +02:00
Thomas Müller 7e2bff8545 adding unit test to truncate the table 2014-09-16 16:17:25 +02:00
Arthur Schiwon 3c9668f605 if only one attribute is requested, the returned array has 0 as key instead of attribute name. fixes #10888 2014-09-05 14:05:37 +02:00
Robin Appelman d0266c0bf8 Use public api for getting l10n 2014-08-31 10:08:22 +02:00
Andreas Fischer 7458e21f2c Use Doctrine Platform to generate SQL query for table truncation. 2014-08-29 20:53:51 +02:00
Arthur Schiwon 371cab367d trigger email detection by Wizard upon any user filter filter change. before it happenend only upon user automatic list filter creation, but not on manual editing 2014-08-29 11:14:36 +02:00
Arthur Schiwon 34761dabb1 write log message, if original value was changed 2014-08-29 11:14:36 +02:00
Arthur Schiwon f47a4a8c15 add unit test for mail detection 2014-08-29 11:14:35 +02:00