diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-01-21 20:45:27 +0100 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-02-02 20:21:57 +0100 |
commit | 34e849d7024ed46568b7829782f602ae7d958abe (patch) | |
tree | 9001d1f39b24843b01a0e081c4a02f66b55a77c4 /settings | |
parent | db49e0fdae4d32324e623073d24adfbc6e0a4ac6 (diff) | |
download | nextcloud-server-34e849d7024ed46568b7829782f602ae7d958abe.tar.gz nextcloud-server-34e849d7024ed46568b7829782f602ae7d958abe.zip |
Add interface INamedToken
Remove $token instanceof DefaultToken || $token instanceof PublicKeyToken
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index b1016fb4a39..5b2788bb0c1 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -31,7 +31,7 @@ use BadMethodCallException; use OC\AppFramework\Http; use OC\Authentication\Exceptions\InvalidTokenException; use OC\Authentication\Exceptions\PasswordlessTokenException; -use OC\Authentication\Token\DefaultToken; +use OC\Authentication\Token\INamedToken; use OC\Authentication\Token\IProvider; use OC\Authentication\Token\IToken; use OC\Settings\Activity\Provider; @@ -115,7 +115,7 @@ class AuthSettingsController extends Controller { return array_map(function (IToken $token) use ($sessionToken) { $data = $token->jsonSerialize(); $data['canDelete'] = true; - $data['canRename'] = $token instanceof DefaultToken || $token instanceof PublicKeyToken; + $data['canRename'] = $token instanceof INamedToken; if ($sessionToken->getId() === $token->getId()) { $data['canDelete'] = false; $data['canRename'] = false; @@ -231,7 +231,7 @@ class AuthSettingsController extends Controller { ]); - if ($token instanceof DefaultToken || $token instanceof PublicKeyToken) { + if ($token instanceof INamedToken) { $token->setName($name); } |