mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-26 16:33:03 +08:00
Merge branch 'smallFixes'
This commit is contained in:
commit
46f51f14d8
8 changed files with 67 additions and 25 deletions
|
@ -192,7 +192,7 @@ class CredentialController extends ApiController {
|
|||
|
||||
try {
|
||||
$acl_list = $this->sharingService->getCredentialAclList($storedCredential->getGuid());
|
||||
} catch (DoesNotExistException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
// Just check if we have an acl list
|
||||
}
|
||||
if (!empty($acl_list)) {
|
||||
|
@ -270,7 +270,7 @@ class CredentialController extends ApiController {
|
|||
public function getRevision($credential_guid) {
|
||||
try {
|
||||
$credential = $this->credentialService->getCredentialByGUID($credential_guid);
|
||||
} catch (DoesNotExistException $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
|
||||
|
@ -306,13 +306,13 @@ class CredentialController extends ApiController {
|
|||
$revision = null;
|
||||
try {
|
||||
$this->credentialService->getCredentialByGUID($credential_guid, $this->userId);
|
||||
} catch (DoesNotExistException $e) {
|
||||
} catch (\Exception $e) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
|
||||
try {
|
||||
$revision = $this->credentialRevisionService->getRevision($revision_id);
|
||||
} catch (DoesNotExistException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ class FileController extends ApiController {
|
|||
public function updateFile($file_id, $file_data, $filename, $mimetype, $size){
|
||||
try{
|
||||
$file = $this->fileService->getFile($file_id, $this->userId);
|
||||
} catch (DoesNotExistException $doesNotExistException){
|
||||
} catch (\Exception $doesNotExistException){
|
||||
|
||||
}
|
||||
if($file){
|
||||
|
|
|
@ -96,13 +96,13 @@ class ShareController extends ApiController {
|
|||
|
||||
try {
|
||||
$credential = $this->credentialService->getCredentialByGUID($item_guid);
|
||||
} catch (DoesNotExistException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
|
||||
try {
|
||||
$acl = $this->shareService->getACL(null, $item_guid);
|
||||
} catch (DoesNotExistException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
$acl = new SharingACL();
|
||||
}
|
||||
|
||||
|
@ -145,14 +145,14 @@ class ShareController extends ApiController {
|
|||
if (count($shareRequests) > 0) {
|
||||
return new JSONResponse(array('error' => 'User got already pending requests'));
|
||||
}
|
||||
} catch (DoesNotExistException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
// no need to catch this
|
||||
}
|
||||
|
||||
$acl = null;
|
||||
try {
|
||||
$acl = $this->shareService->getCredentialAclForUser($first_vault['user_id'], $item_guid);
|
||||
} catch (DoesNotExistException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
// no need to catch this
|
||||
}
|
||||
|
||||
|
@ -247,12 +247,12 @@ class ShareController extends ApiController {
|
|||
$sr = null;
|
||||
try {
|
||||
$acl = $this->shareService->getCredentialAclForUser($user_id, $item_guid);
|
||||
} catch (DoesNotExistException $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
try {
|
||||
$sr = array_pop($this->shareService->getPendingShareRequestsForCredential($item_guid, $user_id));
|
||||
} catch (DoesNotExistException $e) {
|
||||
} catch (\Exception $e) {
|
||||
// no need to catch this
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ class ShareController extends ApiController {
|
|||
public function savePendingRequest($item_guid, $target_vault_guid, $final_shared_key) {
|
||||
try {
|
||||
$sr = $this->shareService->getRequestByGuid($item_guid, $target_vault_guid);
|
||||
} catch (DoesNotExistException $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
|
||||
|
@ -348,7 +348,7 @@ class ShareController extends ApiController {
|
|||
array_push($results, $result);
|
||||
}
|
||||
return new JSONResponse($results);
|
||||
} catch (DoesNotExistException $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ class ShareController extends ApiController {
|
|||
public function getRevisions($item_guid) {
|
||||
try {
|
||||
return new JSONResponse($this->shareService->getItemHistory($this->userId, $item_guid));
|
||||
} catch (DoesNotExistException $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ class ShareController extends ApiController {
|
|||
|
||||
try {
|
||||
return new JSONResponse($this->shareService->getSharedItems($this->userId->getUID(), $vault_guid));
|
||||
} catch (DoesNotExistException $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ class ShareController extends ApiController {
|
|||
|
||||
$this->shareService->cleanItemRequestsForUser($sr);
|
||||
return new JSONResponse(array('result' => true));
|
||||
} catch (DoesNotExistException $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
}
|
||||
|
@ -447,7 +447,7 @@ class ShareController extends ApiController {
|
|||
try {
|
||||
$credential = $this->shareService->getSharedItem(null, $credential_guid);
|
||||
return new JSONResponse($credential);
|
||||
} catch (DoesNotExistException $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ class ShareController extends ApiController {
|
|||
} else {
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
} catch (DoesNotExistException $ex) {
|
||||
} catch (\Exception $ex) {
|
||||
return new JSONResponse(array());
|
||||
}
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ class ShareController extends ApiController {
|
|||
public function getFile($item_guid, $file_guid) {
|
||||
try {
|
||||
$credential = $this->credentialService->getCredentialByGUID($item_guid);
|
||||
} catch (DoesNotExistException $e) {
|
||||
} catch (\Exception $e) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
$userId = ($this->userId) ? $this->userId->getUID() : null;
|
||||
|
@ -511,7 +511,7 @@ class ShareController extends ApiController {
|
|||
public function updateSharedCredentialACL($item_guid, $user_id, $permission) {
|
||||
try {
|
||||
$credential = $this->credentialService->getCredentialByGUID($item_guid);
|
||||
} catch (DoesNotExistException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
if ($this->userId->getUID() === $credential->getUserId()) {
|
||||
|
@ -520,7 +520,7 @@ class ShareController extends ApiController {
|
|||
$acl = $this->shareService->getACL($user_id, $item_guid);
|
||||
$acl->setPermissions($permission);
|
||||
return $this->shareService->updateCredentialACL($acl);
|
||||
} catch (DoesNotExistException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ class VaultController extends ApiController {
|
|||
$vault = null;
|
||||
try {
|
||||
$vault = $this->vaultService->getByGuid($vault_guid, $this->userId);
|
||||
} catch (DoesNotExistException $e) {
|
||||
} catch (\Exception $e) {
|
||||
return new NotFoundJSONResponse();
|
||||
}
|
||||
$result = array();
|
||||
|
@ -136,7 +136,7 @@ class VaultController extends ApiController {
|
|||
$vault = null;
|
||||
try {
|
||||
$vault = $this->vaultService->getByGuid($vault_guid, $this->userId);
|
||||
} catch (DoesNotExistException $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
|
|
20
l10n/fr.js
20
l10n/fr.js
|
@ -20,6 +20,7 @@ OC.L10N.register(
|
|||
"Decrypting credentials" : "Décryptage des informations d'identification",
|
||||
"Done" : "Fait",
|
||||
"File read successfully!" : "Fichier lu avec succès !",
|
||||
"Credential has no label, skipping" : "L'information d'identification n'a pas d'étiquette, ignorée",
|
||||
"Adding {{credential}}" : "{{credential}} en cours d'ajout",
|
||||
"Added {{credential}}" : "{{credential}} ajouté",
|
||||
"Parsed {{num}} credentials, starting to import" : "{{num}} informations d'identification analysées, commence à importer",
|
||||
|
@ -99,6 +100,7 @@ OC.L10N.register(
|
|||
"About Passman" : "À propos de Passman",
|
||||
"Version" : "Version",
|
||||
"Donate to support development" : "Donner pour aider le développement",
|
||||
"Bookmarklet" : "Bookmarklet",
|
||||
"Save your passwords with 1 click!" : "Sauvegardez vos mots de passe en 1 clic !",
|
||||
"Drag below button to your bookmark toolbar." : "Glissez le bouton ci-dessous dans la barre d'outils de vos favoris.",
|
||||
"Import type" : "Type d'importation",
|
||||
|
@ -136,9 +138,16 @@ OC.L10N.register(
|
|||
"10 / second" : "10 / seconde",
|
||||
"10k / second" : "10k / seconde",
|
||||
"10B / second" : "10B / seconde",
|
||||
"Dictionary name" : "Nom du dictionnaire",
|
||||
"Rank" : "Rang",
|
||||
"Reversed" : "Inversé",
|
||||
"Uppercase variations" : "Variations en majuscules",
|
||||
"l33t-variations" : "Variations l33t",
|
||||
"Showing revisions of" : "Montrer les révisions de",
|
||||
"Revision of" : "Révisions de",
|
||||
"by" : "par",
|
||||
"No revisions found." : "Pas de révision trouvée.",
|
||||
"Label" : "Étiquette",
|
||||
"Restore revision" : "Restaurer la révision",
|
||||
"Delete revision" : "Supprimer la révision",
|
||||
"Edit credential" : "Éditer le rapport d'identification",
|
||||
|
@ -146,7 +155,10 @@ OC.L10N.register(
|
|||
"Save" : "Sauvegarder",
|
||||
"Cancel" : "Annuler",
|
||||
"Settings" : "Paramètres",
|
||||
"Share credential {{credential}}" : "Partage l'information d'identification {{credential}}",
|
||||
"Unshare" : "Ne plus partager",
|
||||
"Showing deleted since" : "Montrer ceux supprimés depuis",
|
||||
"Search credential..." : "Rechercher l'information d'identification...",
|
||||
"Account" : "Compte",
|
||||
"Password" : "Mot de passe",
|
||||
"OTP" : "OTP",
|
||||
|
@ -161,7 +173,11 @@ OC.L10N.register(
|
|||
"Share" : "Partager",
|
||||
"Recover" : "Restaurer",
|
||||
"Destroy" : "Détruire",
|
||||
"You have incoming share requests." : "Vous avez des nouvelles demandes de partage.",
|
||||
"If you want to the credential in a other vault," : "Si vous souhaitez obtenir les informations d'identification dans un autre coffre-fort,",
|
||||
"logout of this vault and login to the vault you want the shared credential in." : "déconnectez-vous de ce coffre-fort et connectez-vous au coffre-fort dans lequel vous voulez les informations d'identification partagées.",
|
||||
"Permissions" : "Permissions",
|
||||
"Received from" : "Reçu de",
|
||||
"Date" : "Date",
|
||||
"Accept" : "Accepter",
|
||||
"Decline" : "Refuser",
|
||||
|
@ -174,6 +190,7 @@ OC.L10N.register(
|
|||
"Your sharing key's will have a strength of 1024 bit, which you can change later in settings." : "Votre clé de partage aura un poids de 1024 octet, ce qui pourra être modifié plus tard dans les paramètres.",
|
||||
"Create vault" : "Créer un coffre-fort",
|
||||
"Go back to vaults" : "Retourner aux coffres-forts",
|
||||
"Please input the password for" : "Veuillez entrer le mot de passe pour",
|
||||
"Set this vault as default." : "Choisir ce coffre-fort par défaut.",
|
||||
"Login automatically to this vault." : "Se connecter automatiquement à ce coffre-fort.",
|
||||
"Decrypt vault" : "Déchiffrer le coffre-fort",
|
||||
|
@ -183,7 +200,10 @@ OC.L10N.register(
|
|||
"Deleted credentials" : "Supprimer les informations d'identification",
|
||||
"Logout" : "Se déconnecter",
|
||||
"Donate" : "Donner",
|
||||
"Someone has shared a credential with you." : "Quelqu'un a partagé une information d'identification avec vous.",
|
||||
"Click here to request it" : "Cliquez ici pour le demander",
|
||||
"Loading..." : "Chargement...",
|
||||
"Awwhh.... credential not found. Maybe it expired" : "Awwhh.... information d'identification non trouvée. Il est peut être expiré",
|
||||
"A Passman item has been created, modified or deleted" : "Un élément Passman a été créé, modifié ou supprimé",
|
||||
"A Passman item has expired" : "Un élément Passman a expiré",
|
||||
"A Passman item has been shared" : "Un élément Passman a été partagé",
|
||||
|
|
20
l10n/fr.json
20
l10n/fr.json
|
@ -18,6 +18,7 @@
|
|||
"Decrypting credentials" : "Décryptage des informations d'identification",
|
||||
"Done" : "Fait",
|
||||
"File read successfully!" : "Fichier lu avec succès !",
|
||||
"Credential has no label, skipping" : "L'information d'identification n'a pas d'étiquette, ignorée",
|
||||
"Adding {{credential}}" : "{{credential}} en cours d'ajout",
|
||||
"Added {{credential}}" : "{{credential}} ajouté",
|
||||
"Parsed {{num}} credentials, starting to import" : "{{num}} informations d'identification analysées, commence à importer",
|
||||
|
@ -97,6 +98,7 @@
|
|||
"About Passman" : "À propos de Passman",
|
||||
"Version" : "Version",
|
||||
"Donate to support development" : "Donner pour aider le développement",
|
||||
"Bookmarklet" : "Bookmarklet",
|
||||
"Save your passwords with 1 click!" : "Sauvegardez vos mots de passe en 1 clic !",
|
||||
"Drag below button to your bookmark toolbar." : "Glissez le bouton ci-dessous dans la barre d'outils de vos favoris.",
|
||||
"Import type" : "Type d'importation",
|
||||
|
@ -134,9 +136,16 @@
|
|||
"10 / second" : "10 / seconde",
|
||||
"10k / second" : "10k / seconde",
|
||||
"10B / second" : "10B / seconde",
|
||||
"Dictionary name" : "Nom du dictionnaire",
|
||||
"Rank" : "Rang",
|
||||
"Reversed" : "Inversé",
|
||||
"Uppercase variations" : "Variations en majuscules",
|
||||
"l33t-variations" : "Variations l33t",
|
||||
"Showing revisions of" : "Montrer les révisions de",
|
||||
"Revision of" : "Révisions de",
|
||||
"by" : "par",
|
||||
"No revisions found." : "Pas de révision trouvée.",
|
||||
"Label" : "Étiquette",
|
||||
"Restore revision" : "Restaurer la révision",
|
||||
"Delete revision" : "Supprimer la révision",
|
||||
"Edit credential" : "Éditer le rapport d'identification",
|
||||
|
@ -144,7 +153,10 @@
|
|||
"Save" : "Sauvegarder",
|
||||
"Cancel" : "Annuler",
|
||||
"Settings" : "Paramètres",
|
||||
"Share credential {{credential}}" : "Partage l'information d'identification {{credential}}",
|
||||
"Unshare" : "Ne plus partager",
|
||||
"Showing deleted since" : "Montrer ceux supprimés depuis",
|
||||
"Search credential..." : "Rechercher l'information d'identification...",
|
||||
"Account" : "Compte",
|
||||
"Password" : "Mot de passe",
|
||||
"OTP" : "OTP",
|
||||
|
@ -159,7 +171,11 @@
|
|||
"Share" : "Partager",
|
||||
"Recover" : "Restaurer",
|
||||
"Destroy" : "Détruire",
|
||||
"You have incoming share requests." : "Vous avez des nouvelles demandes de partage.",
|
||||
"If you want to the credential in a other vault," : "Si vous souhaitez obtenir les informations d'identification dans un autre coffre-fort,",
|
||||
"logout of this vault and login to the vault you want the shared credential in." : "déconnectez-vous de ce coffre-fort et connectez-vous au coffre-fort dans lequel vous voulez les informations d'identification partagées.",
|
||||
"Permissions" : "Permissions",
|
||||
"Received from" : "Reçu de",
|
||||
"Date" : "Date",
|
||||
"Accept" : "Accepter",
|
||||
"Decline" : "Refuser",
|
||||
|
@ -172,6 +188,7 @@
|
|||
"Your sharing key's will have a strength of 1024 bit, which you can change later in settings." : "Votre clé de partage aura un poids de 1024 octet, ce qui pourra être modifié plus tard dans les paramètres.",
|
||||
"Create vault" : "Créer un coffre-fort",
|
||||
"Go back to vaults" : "Retourner aux coffres-forts",
|
||||
"Please input the password for" : "Veuillez entrer le mot de passe pour",
|
||||
"Set this vault as default." : "Choisir ce coffre-fort par défaut.",
|
||||
"Login automatically to this vault." : "Se connecter automatiquement à ce coffre-fort.",
|
||||
"Decrypt vault" : "Déchiffrer le coffre-fort",
|
||||
|
@ -181,7 +198,10 @@
|
|||
"Deleted credentials" : "Supprimer les informations d'identification",
|
||||
"Logout" : "Se déconnecter",
|
||||
"Donate" : "Donner",
|
||||
"Someone has shared a credential with you." : "Quelqu'un a partagé une information d'identification avec vous.",
|
||||
"Click here to request it" : "Cliquez ici pour le demander",
|
||||
"Loading..." : "Chargement...",
|
||||
"Awwhh.... credential not found. Maybe it expired" : "Awwhh.... information d'identification non trouvée. Il est peut être expiré",
|
||||
"A Passman item has been created, modified or deleted" : "Un élément Passman a été créé, modifié ou supprimé",
|
||||
"A Passman item has expired" : "Un élément Passman a expiré",
|
||||
"A Passman item has been shared" : "Un élément Passman a été partagé",
|
||||
|
|
|
@ -131,7 +131,9 @@ class CredentialMapper extends Mapper {
|
|||
$credential->setCustomFields($raw_credential['custom_fields']);
|
||||
$credential->setOtp($raw_credential['otp']);
|
||||
$credential->setHidden($raw_credential['hidden']);
|
||||
$credential->setSharedKey($raw_credential['shared_key']);
|
||||
if(isset($raw_credential['shared_key'])) {
|
||||
$credential->setSharedKey($raw_credential['shared_key']);
|
||||
}
|
||||
return parent::insert($credential);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ if ($checkVersion) {
|
|||
<p>
|
||||
<input type="checkbox" name="passman_sharing_enabled"
|
||||
id="passman_sharing_enabled" class="checkbox"
|
||||
value="1" <?php if ($_['user_sharing_enabled']) print_unescaped('checked="checked"'); ?> />
|
||||
value="1" />
|
||||
<label for="passman_sharing_enabled">
|
||||
<?php p($l->t('Allow users on this server to share passwords with other users')); ?>
|
||||
</label>
|
||||
|
|
Loading…
Reference in a new issue