Fix missing admin-settings.js

Remove settings property (Fixes #211)

Add file to avoid errors (Fixes #210)

Fix for deleting credential

Fix for deleting vault (fixes #212)
This commit is contained in:
brantje 2017-01-18 18:38:28 +01:00
parent 472713d41e
commit 612dcd355b
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
5 changed files with 8 additions and 9 deletions

View file

@ -257,7 +257,8 @@ module.exports = function (grunt) {
'js/exporters/exporter-main.js',
'js/exporters/*.js',
'js/app/controllers/*.js',
'js/templates.js'
'js/templates.js',
'js/settings-admin.js'
]
}
}

View file

@ -48,10 +48,6 @@ For an demo of this app visit [https://demo.passman.cc](https://demo.passman.cc)
</post-migration>
</repair-steps>
<settings>
<admin>OCA\Passman\Controller\SettingsController</admin>
</settings>
<background-jobs>
<job>OCA\Passman\BackgroundJob\ExpireCredentials</job>
</background-jobs>

View file

@ -266,8 +266,9 @@ class CredentialController extends ApiController {
} catch (\Exception $e) {
return new NotFoundJSONResponse();
}
if ($credential) {
if ($credential instanceof Credential) {
$result = $this->credentialService->deleteCredential($credential);
//print_r($credential);
$this->deleteCredentialParts($credential);
} else {
$result = false;
@ -286,7 +287,7 @@ class CredentialController extends ApiController {
'', $this->userId, Activity::TYPE_ITEM_ACTION);
$this->sharingService->unshareCredential($credential->getGuid());
foreach ($this->credentialRevisionService->getRevisions($credential->getId()) as $revision) {
$this->credentialRevisionService->deleteRevision($revision->getId(), $this->userId);
$this->credentialRevisionService->deleteRevision($revision['id'], $this->userId);
}
}

View file

@ -158,8 +158,8 @@ class VaultController extends ApiController {
* @NoAdminRequired
* @NoCSRFRequired
*/
public function delete($vault_id) {
$this->vaultService->deleteVault($vault_id, $this->userId);
public function delete($vault_guid) {
$this->vaultService->deleteVault($vault_guid, $this->userId);
return new JSONResponse(array('ok' => true));
}
}

1
personal.php Normal file
View file

@ -0,0 +1 @@
<!-- Placeholder file -->