mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-16 00:15:52 +08:00
fix credential edit link generation for expired credential notifications
This commit is contained in:
parent
5e85719c29
commit
cea77b8ed9
1 changed files with 3 additions and 1 deletions
|
@ -31,11 +31,13 @@ class NotificationService {
|
|||
public function __construct(
|
||||
private IManager $manager,
|
||||
private IURLGenerator $urlGenerator,
|
||||
private VaultService $vaultService,
|
||||
) {
|
||||
}
|
||||
|
||||
function credentialExpiredNotification($credential) {
|
||||
$link = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'index.php/apps/passman/#/vault/' . $credential->getVaultId() . '/edit/' . $credential->getId()));
|
||||
$vaults = $this->vaultService->getById($credential->getVaultId(), $credential->getUserId());
|
||||
$link = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'index.php/apps/passman/#/vault/' . $vaults[0]->getGuid() . '/edit/' . $credential->getGuid()));
|
||||
$api = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'index.php/apps/passman'));
|
||||
$notification = $this->manager->createNotification();
|
||||
$remindAction = $notification->createAction();
|
||||
|
|
Loading…
Add table
Reference in a new issue