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>
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.
add a function getUserGroupIds for retrieving group ids instead of group objects. this significantly improves performance when using many (nested) groups.
Some things my IDE complained about while creating a custom backend.
Fix PHPDoc and typos
Some things my IDE complained about while creating a custom backend.
Conflicts:
lib/private/group/database.php
lib/private/group/dummy.php
lib/private/group/example.php
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
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