MFB
authorJan Schneider <jan@horde.org>
Fri, 11 Sep 2009 13:31:40 +0000 (15:31 +0200)
committerJan Schneider <jan@horde.org>
Tue, 15 Sep 2009 13:02:33 +0000 (15:02 +0200)
kronolith/perms.php

index 176acbb..05a99e5 100644 (file)
@@ -52,6 +52,8 @@ case 'editform':
         if ($old_owner !== $new_owner && !empty($new_owner)) {
             if ($old_owner != Horde_Auth::getAuth() && !Horde_Auth::isAdmin()) {
                 $notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
+            } elseif ($auth->hasCapability('list') && !$auth->exists($new_owner)) {
+                $notification->push(sprintf(_("The user \"%s\" does not exist."), Auth::removeHook($new_owner)), 'horde.error');
             } else {
                 $share->set('owner', $new_owner);
                 $share->save();
@@ -155,6 +157,10 @@ case 'editform':
             if (empty($user) || $user == $new_owner) {
                 continue;
             }
+            if ($auth->hasCapability('list') && !$auth->exists($user)) {
+                $notification->push(sprintf(_("The user \"%s\" does not exist."), Auth::removeHook($user)), 'horde.error');
+                continue;
+            }
 
             if (!empty($u_show[$key])) {
                 $perm->addUserPermission($user, PERMS_SHOW, false);