Commit Graph

63 Commits

Author SHA1 Message Date
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Arthur Schiwon 6c335ee6fc add test for mapping's getList method 2015-01-07 12:39:29 +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
Arthur Schiwon 61ed363f82 planned refactorings for OC 8 2014-12-20 18:28:29 +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 02095d4f20 Merge pull request #11837 from owncloud/fix-11328
unify count filters and introduce display name attribute detection
2014-11-24 18:13:01 +01:00
Arthur Schiwon f725cc66a3 consolidate user count filter in wizard and user back end 2014-11-20 18:31:39 +01:00
Joas Schilling 76ebd3a050 Make apps/ extend the \Test\TestCase and fix overwritten methods 2014-11-19 14:52:09 +01:00
Morris Jobke 9368de5a8b Merge pull request #11789 from owncloud/fix-11762
[LDAP] Login: dont fail with 500 if configured display name attribute is not set
2014-11-11 11:16:41 +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
Arthur Schiwon 05b2a037f2 dont fail with 500 if configured display name attribute is not set 2014-10-27 15:58:23 +01:00
Arthur Schiwon e16122f2a1 add one simple cache test 2014-10-17 20:16:04 +02:00
Thomas Müller 7e2bff8545 adding unit test to truncate the table 2014-09-16 16:17:25 +02:00
Arthur Schiwon aa0ddf21b5 adjust static method vars as well 2014-08-29 11:14:36 +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 f47a4a8c15 add unit test for mail detection 2014-08-29 11:14:35 +02:00
Arthur Schiwon 441c600c90 remove Access as hard dependency, inject it instead 2014-08-29 11:14:16 +02:00
Arthur Schiwon 1c0cc6c7bc fix wizard test, adjust to changed parameters of the tested method, introduced by 9caa354cfc 2014-08-28 11:53:40 +02:00
Arthur Schiwon dbd51d15e1 Port of #8623
set result entry identifier earlier, i.e. before a continue for the same level can happen. otherwise  will always get the same value and we end up in an infinite loop

add unit test to make sure the infinite loop never comes back

Conflicts:
	apps/user_ldap/tests/wizard.php
2014-08-28 11:52:33 +02:00
Arthur Schiwon 97fd39e983 unify tests 2014-08-18 16:55:08 +02:00
Arthur Schiwon eb7d70fc39 adjust login test to code changes 2014-08-12 16:13:17 +02:00
Arthur Schiwon fc6793f2ae better check whether string resembles a DN, fixes #9887 2014-08-11 16:40:41 +02:00
blizzz 1d520108c5 Merge pull request #9576 from owncloud/bcmath-check
LDAP Active Directory Primary Groups support depends on bcmath module
2014-07-18 19:15:36 +02:00
Philippe Jung c13cb6145b File written by blizzz 2014-07-14 22:21:56 +02:00
Arthur Schiwon 537468f4c4 make tests deal with missing bcmath 2014-07-11 14:08:19 +02:00
Arthur Schiwon da490bdbbe support for AD primary groups
support for primary groups

actually the problem is only known on AD, it is only needed to take care of their attributes

adjust to ADs special behaviour

this change was not intended

cache the SID value so it is not requested over and over again

theres only one, use singular

we are access

add tests for new Access methods

add tests for new Group methods

address scrutinizer findings, mostly doc

call ldap_explode_dn from ldap wrapper, enables tests without php5-ldap

PHP Doc

yo dawg, i heard you like backslashes … php doc fix

PHPDoc updated and typos fixed while reviewing
2014-07-08 21:32:21 +02:00
Arthur Schiwon 452efa5fab Port of LDAP Wizard: get correct total no of users, groups and complete list of groups on big setups #9002
fix PHPdoc

Conflicts:
	apps/user_ldap/lib/connection.php

add method to count groups on LDAP

Conflicts:
	apps/user_ldap/lib/access.php

LDAP Wizard: count users and groups with the power of paged search

Conflicts:
	apps/user_ldap/lib/wizard.php

consolidate requirement check

fix PHPdoc

Conflicts:
	apps/user_ldap/lib/access.php

Wizard: get really all groups from LDAP by power of Paged Search

Conflicts:
	apps/user_ldap/lib/wizard.php

make all this work in an early configuration state in the wizard by marking  the config active and ignoring the validation state.

Conflicts:
	apps/user_ldap/lib/connection.php

simplify two methods a bit, because they are not used for group search anymore

Conflicts:
	apps/user_ldap/lib/wizard.php

remove unused vars; increase scrutinizer happiness
2014-06-25 11:45:55 +02:00
Arthur Schiwon ba82d80f32 adjust group tests 2014-06-03 12:59:11 +02:00
Arthur Schiwon 3fed96af0e clean up 2014-06-03 12:59:11 +02:00
Arthur Schiwon 5336e9a156 newlines 2014-06-03 12:59:10 +02:00
Arthur Schiwon d52fbd7e55 adjust test to changed convention in storing quota 2014-06-03 12:59:10 +02:00
Arthur Schiwon e07ebdd7d0 adjust user backend test 2014-06-03 12:59:10 +02:00
Arthur Schiwon b0d1b2557c adjust Access test 2014-06-03 12:59:09 +02:00
Arthur Schiwon 6d64d7ec3f LDAP: put out fetching of user meta data into a fully tested class of its own and update them (mail, quota, etc.) directly after mapping. Fixes #7785 properly on master 2014-06-03 12:59:09 +02:00
Morris Jobke dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Robin McCorkell c4f1de63a8 Fix PHPDoc in /apps 2014-05-16 22:21:57 +01:00
Lukas Reschke cd3ed01483 Fix Typo
I guess that should be `default` and not `defautl`, wondering how this ever worked.
2014-05-11 15:24:42 +02:00
Lukas Reschke 340089f270 Merge pull request #8059 from owncloud/countUsersInGroup
add optional countUsersInGroup method to group backends
2014-04-14 20:45:12 +02:00
blizzz 9feebeaf40 Merge pull request #7837 from owncloud/fix_7530
LDAP: fix determining objectclasses takes long
2014-04-09 12:27:17 +02:00
Arthur Schiwon 2407321625 add tests for LDAP 2014-04-08 12:57:06 +02:00
Arthur Schiwon 422ccf4cdb add test for cloning and keeping configuration seperate 2014-03-21 15:31:30 +01:00
Arthur Schiwon 6f605ecd67 make tests work on systems without php5_ldap 2014-03-21 10:08:17 +01:00
Arthur Schiwon 3d2ab76347 add tests for cumulativeSearchOnAttribute 2014-03-21 00:17:51 +01:00
Arthur Schiwon d5690a174e LDAP: fix and extend tests 2014-02-20 14:05:45 +01:00
Arthur Schiwon 677d83d45f LDAP: add tests for countUsers 2014-01-08 12:24:29 +01:00