schollz / cowyo

A feature-rich wiki webserver for minimalists :cow: :speech_balloon:
https://cowyo.com/
MIT License
924 stars 67 forks source link

Lock page with respect to session #119

Closed katomaso closed 6 years ago

katomaso commented 6 years ago

Introduce per-session (per-user) unlocking as discussed in #110

Now when unlocking a page then the is unlocked only for the user who actually unlocked it. It is implemented by adding "UnlockedFor" attribute to Page struct and fill it with randomly generated "sid" stored in a session storage.

Comments are welcome!

schollz commented 6 years ago

@katomaso Sorry it took so long to get to this! It really is an awesome contribution. Its a feature I never really thought about but it makes it would be very useful for highly trafficked pages. I've tried it out and it works great, thanks!!