styxit / HTPC-Manager

A fully responsive interface to manage all your favorite software on your Htpc.
http://htpc.io
MIT License
529 stars 183 forks source link

Protect settings, sexy login, manage users #265

Closed Hellowlol closed 10 years ago

Hellowlol commented 10 years ago

Users does not have access to to kill processes, use the commandline in stat module, shutdown server and the settings page. Clicks on restricted links will be redirected to the login page. Ajax calls are simply ignored. It might be other this that is restricted but thats what i can remember from the top of my head.

http://imgur.com/nHbcZhG http://imgur.com/ftyrr7C http://imgur.com/954qgsm

https://github.com/styxit/HTPC-Manager/issues/165 https://github.com/styxit/HTPC-Manager/issues/186

styxit commented 10 years ago

This looks really nice. I like this. Give me some time to test it and i will merge it.

Hellowlol commented 10 years ago

Let me know if you find any bugs.

styxit commented 10 years ago

How do i enable the login stuff? i created a new user, with a username and password, role admin. But i can still access the settings page and i don't heve to provide login details. What did i miss?

Hellowlol commented 10 years ago

Set a passord and a username on the general tab enables auth

Den 10. aug. 2014 kl. 12:33 skrev Styxit notifications@github.com:

How do i enable the login stuff? i created a new user, with a username and password, role admin. But i can still access the settings page and i don't heve to provide login details. What did i miss?

— Reply to this email directly or view it on GitHub.

brendann993 commented 10 years ago

Not sure if its a issue, or my lack of knowledge, But I have tried this with a base dir set up, when browsing to the page, at "examplehost:port/{basedir}" it redirected to "examplehost:port/auth/login" I would assume its trying to get to "examplehost:port/{basedir}/auth/login" If you or anyone else confirms it does work in this situation, I may have to play with my settings a bit more.

Hellowlol commented 10 years ago

To be honest I haven't tried to use the webdir. I need to get back to you regarding that since I don't have access to my laptop now. Guess I hardcoded that URL in, should be easy fix if that is the case.

Hellowlol commented 10 years ago

@bjtaylor93 Can you update and try again?

brendann993 commented 10 years ago

Updated and now works correctly, Thanks. Nice work aswell. I'll update if I notice anything else not working but all looks good now.

styxit commented 10 years ago

I am working on some changes on this PR, so will merge soon. One question; What happens with users already using the (old) authentication, when updating to this version? Is the current username and password kept and accepted on the new login page?

Hellowlol commented 10 years ago

Yes, if there is a htpc username and password that will be added to the db as admin and auth will be activated. The user will be redirected to the login page where they have to enter the same username and password that was set in htpc password and username.

styxit commented 10 years ago

@Hellowlol Thank you so much for al your great work!