Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking an app update notification should open app updates #30836

Closed
rigrig opened this issue Jan 25, 2022 · 3 comments · Fixed by nextcloud/notifications#1276
Closed

Clicking an app update notification should open app updates #30836

rigrig opened this issue Jan 25, 2022 · 3 comments · Fixed by nextcloud/notifications#1276
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement

Comments

@rigrig
Copy link
Contributor

rigrig commented Jan 25, 2022

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
When I see a notification about available app updates, I always click it expecting to go to the app updater page, but that doesn't work. So I have to navigate there myself: open Apps from the menu, select Updates on the left, which is a bit annoying (not so much the navigation, but that clicking the notification doesn't work.)

Describe the solution you'd like
It would be nice if admin users could click on the notification, to open the app updates page.
Complicating things a bit: this should only happen for admin users: other users without access to the settings can also get notified, but clicking the notification should not try to open a page they don't have access to.

Additional context
Clicking here as admin user:
image
Would take you directly to /settings/apps/updates

@rigrig rigrig added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jan 25, 2022
@ogasser
Copy link
Contributor

ogasser commented Sep 19, 2022

@nickvergessen would this be possible by adding a simple link or does modification in the notifications app?

CC @jancborchardt

@nickvergessen
Copy link
Member

That is exactly what we are doing since 4+ years:

  • Server

if ($this->isAdmin()) {
$notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index', ['section' => 'overview']) . '#version');
}

  • Apps

if ($this->isAdmin()) {
$notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps', ['category' => 'updates']) . '#app-' . $notification->getObjectType());
}

  • Admin check

protected function isAdmin(): bool {
$user = $this->userSession->getUser();
if ($user instanceof IUser) {
return $this->groupManager->isAdmin($user->getUID());
}
return false;
}

But I also see that it is not working on our company instance.
I will try to have a look again

@nickvergessen
Copy link
Member

Now it made click.... fix is in nextcloud/notifications#1276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants