Add custom app to user dashboard

Hi,

I have a custom webpage on http://myserver/webpage.

I’d like users to connect to yunohost before access to that page, then display it as an app on their dashboard.

Is there a simple to do that, or should I create a custom app and install it like another “real” app ?

Thanks !

Hello,

Do you mean that http://myserver/webpage is served by a Custom Webapp, installed via YunoHost?

If so, if you want to force users to log in before accessing it, you have to tweak the permissions in the webadmin. Your app’s permission should be something like my_webapp.main:

  1. Remove it from the Visitors
  2. Add it to “All Users”

However, if your users are logged off and try to access the page, they will be asked for their credentials and will directly be brought to the app if the login is successful. They will see it in the dashboard only if they open its page.

1 Like

no it’s just some code in /var/www/html, not installed with yunohost

But yes, I’m trying to do what you described

OK! Then I would advise you to create such Custom Webapp and move your files over there, so that YNH can handle them. It works the same way as you did if your files, except the directory is in /var/www/my_webapp/www.

There is no other clean way to protect a path served by Nginx and restrict access through the SSO.

Thank you !

1 Like