diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-01-20 21:30:51 +0100 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-02-02 20:21:50 +0100 |
commit | db49e0fdae4d32324e623073d24adfbc6e0a4ac6 (patch) | |
tree | d8149c00276a4f838e1f9277ac5e0984f0153112 /settings/Controller | |
parent | 86f0f867ec80ed47df80e66848936f1d0a1aa271 (diff) | |
download | nextcloud-server-db49e0fdae4d32324e623073d24adfbc6e0a4ac6.tar.gz nextcloud-server-db49e0fdae4d32324e623073d24adfbc6e0a4ac6.zip |
Add canRename & name to tests
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index 46ef21cb2c6..b1016fb4a39 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -118,6 +118,7 @@ class AuthSettingsController extends Controller { $data['canRename'] = $token instanceof DefaultToken || $token instanceof PublicKeyToken; if ($sessionToken->getId() === $token->getId()) { $data['canDelete'] = false; + $data['canRename'] = false; $data['current'] = true; } return $data; @@ -155,6 +156,7 @@ class AuthSettingsController extends Controller { $deviceToken = $this->tokenProvider->generateToken($token, $this->uid, $loginName, $password, $name, IToken::PERMANENT_TOKEN); $tokenData = $deviceToken->jsonSerialize(); $tokenData['canDelete'] = true; + $tokenData['canRename'] = true; $this->publishActivity(Provider::APP_TOKEN_CREATED, $deviceToken->getId(), $deviceToken->getName()); |