Skip to content

Commit

Permalink
adjust access permissions of new controller method
Browse files Browse the repository at this point in the history
- fixes wrong veriable usage also

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Jun 29, 2021
1 parent 38a2a6b commit 8d3fb41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/provisioning_api/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,10 @@ public function getEditableFieldsForUser(string $userId): DataResponse {
}

/**
* @NoAdminRequired
* @NoSubAdminRequired
* @PasswordConfirmationRequired
*
* @throws OCSException
*/
public function editUserMultiValue(
Expand Down Expand Up @@ -663,7 +667,7 @@ public function editUserMultiValue(
$mailCollection = $userAccount->getPropertyCollection(IAccountManager::COLLECTION_EMAIL);
$targetProperty = null;
foreach ($mailCollection->getProperties() as $property) {
if ($property->getValue() === $value) {
if ($property->getValue() === $key) {
$targetProperty = $property;
break;
}
Expand Down

0 comments on commit 8d3fb41

Please sign in to comment.