pondersource / nextcloud-mfa-awareness

Make Nextcloud aware of whether the current user is logged in with Multi-Factor Authentication
MIT License
0 stars 2 forks source link

Link to route the proper way #85

Closed michielbdejong closed 9 months ago

michielbdejong commented 9 months ago

The relative path used in https://github.com/pondersource/mfazones/blob/1f5d37ff002bcd7fb218e79dfeaaf37ec508f123/js/tabview.js#L240 sometimes ends up on http://127.0.0.1:8080/index.php/apps/settings/user/security instead of http://127.0.0.1:8080/index.php/settings/user/security

I think there is a utility function to find the path for a route in a more robust way, will see if I can use that instead.

michielbdejong commented 9 months ago

On the server-side it can be done with https://docs.nextcloud.com/server/latest/developer_manual/basics/routing.html#using-the-urlgenerator Will see if it can also be done from JS

michielbdejong commented 9 months ago

ah yes https://docs.nextcloud.com/server/latest/developer_manual/basics/front-end/js.html#generating-urls