Commit Graph

75 Commits

Author SHA1 Message Date
Morris Jobke bf17ac929d Merge pull request #15169 from rullzer/fix_displayNamesInGroup
Groupmanagers displayNamesInGroup should actually search in displaynames
2015-03-30 17:04:09 +02:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Roeland Jago Douma abfb524b29 When searching for displayname then search for displayname 2015-03-24 21:35:44 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Joas Schilling 6e9f3b2f7e Clear the local cache when we clear the backends 2015-02-25 16:03:12 +01:00
Vincent Petry 4290e1990e Merge pull request #13829 from owncloud/appmanager-list
Better caching for enabled apps
2015-02-23 16:03:32 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Robin Appelman 409453bc60 better user group caching 2015-02-17 15:05:29 +01:00
Bernhard Posselt 6779bf113d add isAdmin and isInGroup methods for the group manager 2014-12-17 17:41:57 +01:00
Lukas Reschke fe7d9a7ca0 Add REST route for user & group management
First step of a somewhat testable user management. - I know, the JSON returns are in an ugly format but the JS expects it that way. So let's keep it that way until we have time to fix the JS in the future.
2014-12-08 12:11:01 +01:00
Lukas Reschke af56429a9a Merge pull request #12470 from owncloud/jenkins-12447
Jenkins 12447
2014-11-27 15:16:14 +01:00
Joas Schilling 24511c6f00 Move OC_GROUP_BACKEND_* constants to OC_Group_Backend class 2014-11-27 13:47:30 +01:00
Joas Schilling e1f3abf7a5 Correctly namespace and autoload DatabaseException 2014-11-27 11:10:04 +01:00
Morris Jobke c0d63680ed Merge pull request #11479 from owncloud/cleanup-group-admin-on-deleteGroup
cleanup group admin(s) on deleteGroup
2014-11-13 22:39:40 +01: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
Arthur Schiwon a7a532f58a with several backends, more than limit can be returned 2014-10-17 20:16:04 +02:00
blizzz 688a141586 Merge pull request #9104 from macjohnny/macjohnny-drastic-ldap-speedup
drastic ldap speedup (update)
2014-10-17 12:07:27 +02:00
michag86 8abe441d4a cleanup group admin(s) on deleteGroup 2014-10-08 14:05:06 +02:00
michag86 ca58ac50a2 fix for issue #10880 2014-10-07 16:07:48 +02:00
Vincent Petry d7db006315 Revert "fix for issue #10880"
This reverts commit 0df070a8e4.
2014-10-07 15:54:25 +02:00
michag86 0df070a8e4 fix for issue #10880 2014-10-07 14:30:14 +02:00
blizzz b8a1340538 Merge pull request #9225 from voxsim/fix_displayNamesInGroup
fix in displayNamesInGroup
2014-09-22 12:13:15 +02:00
voxsim 7a14f94ae5 1. remove sizeof($filteredUsers) > 0 as condition
2. use count instead of sizeof. Latter is an alias to first one, practically we stick to count everywhere. Having it consistent helps with readability.
3. move whitespace so we have $groupUsers[] = $filteredUser; instead of $groupUsers []= $filteredUser;
2014-09-18 17:50:19 +02:00
voxsim 1366133d2b add more logic in displayNamesInGroup for big user bases 2014-09-15 18:37:54 +02:00
Arthur Schiwon 0bb460c9b5 retrieve local users, groups and group members in a sorted way 2014-08-29 15:17:37 +02:00
voxsim a49610e18a change logic in displayNamesInGroup and add some unit tests 2014-08-28 13:51:48 +02:00
Thomas Müller a72dae6842 Merge pull request #10144 from owncloud/issue/9972
Issue/9972 Fix issues with group and username `0`
2014-08-06 09:53:13 +02:00
Joas Schilling f80baf03d4 Fix getting group '0' from database backend
Fix #9972
2014-08-04 15:53:55 +02:00
Robin Appelman 94fa21d146 Add group management to the public api 2014-07-16 14:25:31 +02:00
Stephan Peijnik 4d74aa09bf Port of #9584
Fixes #9583

lib/private/group/metadata.php: For subadmins also return an array of groups, indexed by their GIDs.
settings/users.php: Convert array of arrays to array of GIDs before calling into OC_Group::displayNamesInGroups.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>

Fix indentation.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>

Renamed $grp to $group in foreach loop.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>

Use is_null() instead of empty() when checking the return value of GroupManager::get().

Additionally, $grp was renamed to $group inside
 \OC\Group\MetaData::fetchGroups().

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>

Updated code to reflect changes introduced to \OC\Group\MetaData.

Now that fetchGroups() does not exist anymore and getGroups() is called
directory, the 'groups' property does not exist anymore.
Instead, we now generate that array on the fly and return it from getGroups.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
2014-07-16 12:23:26 +02:00
Thomas Müller 73e2bf7bf4 fixing PHPDoc 2014-07-14 21:26:47 +02:00
Arthur Schiwon ab2c7e06a4 remove dead code
do not filter groups. but update the user count according to the filter

improve phpdoc

improve metadata runtime cache

add metadata tests
2014-07-14 21:26:37 +02:00
voxsim 5d30ed9ad1 fix in displayNamesInGroup: when specified limit N, we did complex search only in the first N users 2014-06-26 12:38:33 +02:00
Arthur Schiwon f3ecf819ec extend Dummy user and group implementation to pass tests 2014-06-25 13:13:53 +02:00
Arthur Schiwon 121d52860e return int, not string 2014-06-24 21:54:57 +02:00
macjohnny 11ccb57fc7 modified caching mechanism in getUserGroupIds
removed cachedUserGroupIds, instead changed indexing in getUserGroups to groupId
2014-06-23 15:59:27 +02:00
macjohnny 24e397afd2 clean up function getUserGroupIds
clean up of function getUserGroupIds and improved caching mechanism of cachedUserGroupIds
2014-06-23 14:47:19 +02:00
Arthur Schiwon 01a012980a search term for users and groups may occur anywhere in the name or displayname, not just in the beginning 2014-06-23 12:03:09 +02:00
macjohnny 405e89f45a Update manager.php 2014-06-21 16:06:11 +02:00
macjohnny 6a3d6d3e4b Update manager.php 2014-06-19 20:32:37 +02:00
macjohnny 14fcd68172 Update manager.php 2014-06-19 19:35:10 +02:00
macjohnny c954168973 Update manager.php
defined $uid in getUserGroupIds
2014-06-19 13:28:37 +02:00
macjohnny 18c7c94b7a Update manager.php
added description and blank lines in getUserGroupIds
2014-06-19 11:41:29 +02:00
macjohnny 356e4b6665 Update manager.php
add caching to getUserGroupIds
2014-06-19 11:37:46 +02:00
macjohnny 767aa4e35f drastic speedup for nested ldap groups
add a function getUserGroupIds for retrieving group ids instead of group objects. this significantly improves performance when using many (nested) groups.

Changes a function call in getUserGroups to only retrieve group ids instead of objects.
this change significantly improves performance when using owncloud with many groups, e.g. nested ldap hierarchy (1.2.840.113556.1.4.1941), since getUserGroups gets called in oc_share::getItems, which is needed for every page request.
in my particular case, it took more than 10s to load the calendar page and more than 6s to load the file page.
this was in an environment with 100 user groups (nested) per user. The performance was bad due to the following call stack:
self::getManager()->getUserGroups($user)
  - getGroupObject() (executed for every group!)
     - groupExists() (resulting in many ldap-requests)
since the groups are loaded from ldap, it is unnecessary to check whether the group exists or not.
2014-06-13 00:04:06 +02:00
Morris Jobke ab7cff6dfd Revert "Merge pull request #8998 from macjohnny/master"
This reverts commit 482eded8b3, reversing
changes made to 354cace14a.
2014-06-12 14:56:46 +02:00
macjohnny e8e2e47e68 Update manager.php 2014-06-12 11:29:20 +02:00
macjohnny ede2aa236e Update manager.php
add a function getUserGroupIds for retrieving group ids instead of group objects. this significantly improves performance when using many (nested) groups.
2014-06-12 09:41:23 +02:00
Arthur Schiwon 2d83c68f05 make search parameter optional, which is already the case in the medthod it is passed to 2014-06-02 12:53:59 +02:00
Arthur Schiwon a9e8d53c8f fix PHPDoc 2014-06-02 12:53:59 +02:00