Implement user agnostic urls that we can link to


(Martin Heidegger) #1

If I want to document or write a tutorial on how to use discourse I have to define links like

https://meta.discourse.org/users/<your-user-name>/private-messages

Which is a link that no user can click. Everyone needs to modify the links to work well. How about using/offering different links like:

https://meta.discourse.org/my/private-messages
https://meta.discourse.org/my/activity
https://meta.discourse.org/my/settings

Good idea?


(Jeff Atwood) #2

How difficult would this be to implement @eviltrout?


(Sam Saffron) #3

rails side is trivial, its just that you don’t want to have to add special logic everywhere you display a user link. as long as we are happy with a redirect I don’t think ember will be such a problem as well.


(Robin Ward) #4

Ember can happily redirect this if you’re logged in. What would happen if you followed a link like that and weren’t logged in though?


(Sam Saffron) #5

404 I guess, with a custom message I guess (or unauthorized). (this page is only available to logged on users)


(Jeff Atwood) #6

It’s a good idea, so I think if it is easy we should do it next week @eviltrout.


(Robin Ward) #7

I’ve just committed support for this. Should be available later today!

https://github.com/discourse/discourse/commit/b9ca1247561b0486289ea5bf645ed319dc0127b2


(Jeff Atwood) #8

Great! We can also use this internally in PMs to the user (provided the redirect also works locally/internally and not just from external links…)


(Jeff Atwood) #9