[Pkg-owncloud-commits] [owncloud] 16/23: Fix username for subadmins and only send subadmin groups

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 15:21:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 9c6e87849bbc5166efdbbdfc3f111b8f5ab98627
Author: Joas Schilling <nickvergessen at gmx.de>
Date:   Mon Jul 21 11:20:55 2014 +0200

    Fix username for subadmins and only send subadmin groups
    
    Fix #9748
---
 settings/ajax/userlist.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/settings/ajax/userlist.php b/settings/ajax/userlist.php
index 2bf4068..a99c221 100644
--- a/settings/ajax/userlist.php
+++ b/settings/ajax/userlist.php
@@ -76,10 +76,13 @@ if (OC_User::isAdminUser(OC_User::getUser())) {
 	$batch = OC_Group::usersInGroups($groups, $pattern, $limit, $offset);
 	foreach ($batch as $uid) {
 		$user = $userManager->get($uid);
+
+		// Only add the groups, this user is a subadmin of
+		$userGroups = array_intersect(OC_Group::getUserGroups($uid), OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()));
 		$users[] = array(
-			'name' => $user,
+			'name' => $uid,
 			'displayname' => $user->getDisplayName(),
-			'groups' => join(', ', OC_Group::getUserGroups($uid)),
+			'groups' => join(', ', $userGroups),
 			'quota' => OC_Preferences::getValue($uid, 'files', 'quota', 'default'),
 			'storageLocation' => $user->getHome(),
 			'lastLogin' => $user->getLastLogin(),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list