rasmusbergpalm / jslate

Write your dashboards in pure html/js
jslate.com
244 stars 54 forks source link

Login Page after initial installation of jslate #5

Closed fairul82 closed 12 years ago

fairul82 commented 12 years ago

Thanks for the great widget based dashboard.

I am having difficulty to bypass login page ...from the DB I couldnt find any table direclty related to user login .

fairul82 commented 12 years ago

Oppss crying foul too fast..Its there after running jslate.sql..It works all fine..Thanks for the wonderful dashboard..

rasmusbergpalm commented 12 years ago

Difficulties? Please describe in a but more detail. The db table is Users btw. Cheers

On 13/07/2012, at 18.41, FAIRUL RIZAL reply@reply.github.com wrote:

Thanks for the great widget based dashboard.

I am having difficulty to bypass login page ...from the DB I couldnt find any table direclty related to user login .


Reply to this email directly or view it on GitHub: https://github.com/rasmusbergpalm/jslate/issues/5

pjobson commented 12 years ago

There's no way to login by default, the jslate.sql doesn't create a default user.

I tried manually entering a user into the db with a plain text password, md5 hashed password, sha1 hashed password .. When attempting to login with any of the above, it just returns: "Login failed. Invalid username or password."

fairul82 commented 12 years ago

I think thats the default authentication module from cakePHP,I just disabled those in order to use jslate..

pjobson commented 12 years ago

@fairul82 .. Can you pass me a hint on how to disable it? I don't know much about cake, I've only recently worked with code igniter.

pjobson commented 12 years ago

Anyone know how to disable authentication? Bueller? Bueller?

pjobson commented 12 years ago

Got it .. add the following to: app/views/users/add.ctp

Then go to: http://your_host_name/jslate/users/add

function beforeFilter() {
    $this->Auth->allow('*');
}
receptor commented 12 years ago

pjobson, I did that and it doesn't work. Fails in users_controller.php on line 37 when saving user. It has some problems with validation, but I don't know how to get validation error details.

rasmusbergpalm commented 12 years ago

If you want to disable Auth, then you should Add $this->Auth->allow('*'); to AppController.php beforeFilter method

BUT what you really should do is just go to jslate_base_url/users/add and create a user. I'm not even sure it can work without a user as all dashboards belong to a user

receptor commented 12 years ago

I did that and I could access the add user page, but it would not let me add any users because of cake validation. I had to go to models/user.php and remove validations from $validate array. That allowed me to add new user.

rasmusbergpalm commented 12 years ago

Ok... Did you input something weird as username/password? (it requires an email and a non-empty string i think) What validations did you have to remove?

receptor commented 12 years ago

user: me@home, passwd: pass. This gives me 'The user could not be saved. Please, try again.' I've removed temporarily all validations, ended up with var $validate = array(). Then I could create user.

rasmusbergpalm commented 12 years ago

Alright. That sounds like a bug.. Can you please create an issue for it?

Cheers, Rasmus.

On Fri, Aug 10, 2012 at 4:26 PM, receptor notifications@github.com wrote:

user: me@home, passwd: pass. This gives me 'The user could not be saved. Please, try again.' I've removed temporarily all validations, ended up with var $validate = array(). Then I could create user.

— Reply to this email directly or view it on GitHubhttps://github.com/rasmusbergpalm/jslate/issues/5#issuecomment-7646011.

rasmusbergpalm commented 12 years ago

Aha. It's probably because you should have used me@home.com

On Fri, Aug 10, 2012 at 4:26 PM, receptor notifications@github.com wrote:

user: me@home, passwd: pass. This gives me 'The user could not be saved. Please, try again.' I've removed temporarily all validations, ended up with var $validate = array(). Then I could create user.

— Reply to this email directly or view it on GitHubhttps://github.com/rasmusbergpalm/jslate/issues/5#issuecomment-7646011.

receptor commented 12 years ago

Yes, you're right. That worked