Skip to content

Commit

Permalink
Rename token -> e2eToken as discussed
Browse files Browse the repository at this point in the history
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
  • Loading branch information
georgehrke committed Apr 23, 2020
1 parent 728999f commit 46b9b1a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/Controller/RequestHandlerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,16 +353,16 @@ public function setMetaData(int $id, string $metaData): DataResponse {
*
* @param int $id file id
* @param string $metaData
* @param string $token
* @param string $e2eToken
*
* @return DataResponse
* @throws OCSForbiddenException
* @throws OCSBadRequestException
* @throws OCSNotFoundException
*/
public function updateMetaData(int $id, string $metaData, string $token): DataResponse {
public function updateMetaData(int $id, string $metaData, string $e2eToken): DataResponse {

if ($this->lockManager->isLocked($id, $token)) {
if ($this->lockManager->isLocked($id, $e2eToken)) {
throw new OCSForbiddenException($this->l->t('You are not allowed to edit the file, make sure to first lock it, and then send the right token'));
}

Expand Down Expand Up @@ -477,17 +477,17 @@ public function removeEncryptionFlag(int $id): DataResponse {
* @NoAdminRequired
*
* @param int $id file ID
* @param string $token token to identify client
* @param string $e2eToken token to identify client
*
* @return DataResponse
* @throws OCSForbiddenException
*/
public function lockFolder(int $id, string $token = ''): DataResponse {
$token = $this->lockManager->lockFile($id, $token);
public function lockFolder(int $id, string $e2eToken = ''): DataResponse {
$e2eToken = $this->lockManager->lockFile($id, $e2eToken);
if ($token === null) {
throw new OCSForbiddenException($this->l->t('File already locked'));
}
return new DataResponse(['token' => $token]);
return new DataResponse(['token' => $e2eToken]);
}


Expand Down

0 comments on commit 46b9b1a

Please sign in to comment.