Commit graph

38 commits

Author SHA1 Message Date
Bernhard Posselt
6779bf113d add isAdmin and isInGroup methods for the group manager 2014-12-17 17:41:57 +01:00
Joas Schilling
24511c6f00 Move OC_GROUP_BACKEND_* constants to OC_Group_Backend class 2014-11-27 13:47:30 +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
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
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
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
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
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
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
Morris Jobke
804020bb6d Merge pull request #7363 from owncloud/optimize-startup-queries
Optimize some queries that are always executed when loading base.php
2014-05-19 01:21:37 +02:00
Robin McCorkell
a7ae2e874a Squash 'a | b' into 'a|b', in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell
b5bc37d2e4 Fix @return array PHPDocs, in /lib 2014-05-13 19:08:14 +01:00
Bart Visscher
f569c721a6 Merge branch 'master' into optimize-startup-queries
Conflicts:
	apps/files_sharing/lib/sharedstorage.php
	tests/lib/group/manager.php

removed hasFilesSharedWith from lib/public/share.php and
sharedstorage.php to fix merge
2014-05-07 17:54:38 +02:00
Arthur Schiwon
45e42c25de Group Database backend must not gather user details itself but ask user
backends. This is a port to master from PR #7745

remove OC_GROUP_BACKEND_GET_DISPLAYNAME option for group backends

Conflicts:
	lib/private/group/backend.php

LDAP: getDisplayNamesInGroup is not an option for group backends anymore

Conflicts:
	apps/user_ldap/group_ldap.php
	apps/user_ldap/group_proxy.php

clean up group backends

Conflicts:
	lib/private/group/database.php

remove now unnecessary test

implement getDisplayNames in group manager

adjust user manager tests

test for group manager's displayNamesInGroup

trim must not be used in empty in PHP < 5.5

keep the constant to not provoke PHP warnings

Conflicts:
	lib/private/group/backend.php
2014-04-28 13:49:56 +02:00
Arthur Schiwon
64679b2e62 Remove limit and offset manipulation when getting users or groups, because it does not work when more than one user or group backend. Fixing it would be too costly performancewise, so we switch back to the model used in OC 5: limit and offset are effective per backend, and not a general constraint 2014-04-15 17:46:48 +02:00
Bart Visscher
cb37a2716a Also clear cached UserGroup when a user is added/removed 2014-02-27 20:09:07 +01:00
Bart Visscher
00e27d5343 Clear the cached user groups when a group is deleted 2014-02-27 19:12:03 +01:00
Bart Visscher
6f4ecd32b3 Add more caching in the group manager 2014-02-21 23:07:35 +01:00
Robin Appelman
b35f679483 Fix test cases for group manager 2014-02-14 15:07:08 +01:00
Robin Appelman
0ba0596341 remove duplicate call to groupExists 2014-02-14 14:25:45 +01:00
Thomas Müller
9c9dc276b7 move the private namespace OC into lib/private - OCP will stay in lib/public
Conflicts:
	lib/private/vcategories.php
2013-09-30 16:36:59 +02:00
Renamed from lib/group/manager.php (Browse further)