diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-03-15 14:24:21 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-03-15 14:24:21 +0100 |
commit | 4e9c3b3d641d9f11a78420163dfad46c74e554b8 (patch) | |
tree | c5c3cc5cb6214a2856b8a101394f6752383f5355 /build | |
parent | 8eb963849073923bfbd0e79e9e6c4f21812b7c43 (diff) | |
download | nextcloud-server-4e9c3b3d641d9f11a78420163dfad46c74e554b8.tar.gz nextcloud-server-4e9c3b3d641d9f11a78420163dfad46c74e554b8.zip |
Always use the admin when putting poeple in a group
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/features/bootstrap/Provisioning.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php index bf84058c05e..feeb850ae7d 100644 --- a/build/integration/features/bootstrap/Provisioning.php +++ b/build/integration/features/bootstrap/Provisioning.php @@ -175,14 +175,15 @@ trait Provisioning { * @param string $group */ public function assureUserBelongsToGroup($user, $group){ + $previous_user = $this->currentUser; + $this->currentUser = "admin"; + if (!$this->userBelongsToGroup($user, $group)){ - $previous_user = $this->currentUser; - $this->currentUser = "admin"; $this->addingUserToGroup($user, $group); - $this->currentUser = $previous_user; } - $this->checkThatUserBelongsToGroup($user, $group); + $this->checkThatUserBelongsToGroup($user, $group); + $this->currentUser = $previous_user; } /** |