Closed halkeye closed 11 years ago
It looks like the change password does not work. I'm having a look.
Does it give an error message or anything?
I'm pretty sure you can't change the password through the normal api of the main admin user. Thats why my screenshot was a random reporter_ user (I prefix my reporters with reporter))
I'll see if i can figure out how to detect admin users.
Yes, that's what I've just figured out, I was trying to change my admin user password. Futon on IrisCouch can update admin passwords with a PUT to /_config/admin/adminname containing the password as the body of the request. It looks like the _config API is specific to IrisCouch.
We can detect that a user is admin by looking for the _admin role.
I installed couch 1.2.1 yesterday. Looks like the put thing works for that install as well.
Would it be better to not allow admins to change password, or do the PUT as it should work in at least some/most cases?
My vote is the PUT.
We might first send a GET to the same URL. It returns this kind of output if successful:
"-hashed-ebf7c6439526f65fc4b2900a69a4665d15112907,e43105b7ed145d27d200fd7f0f8b149d"
hit the url just to see if the url is valid? Then disable change password if the url is not hittable?
That works for me.
I'll also update the login dialog so it fails with bad password/username/etc instead of silently failing.
Yes, and it should broadcast acralyzerEvents.LOGGED_IN
and acralyzerEvents.LOGGED_OUT
events to update the dashboard and start the background polling.
I don't know why, I haven't been able to send these events. It must have to do with the $apply
block in updateState
, I did not understand why it is required here...
So the way I understand it, ng-click, events, and $http, all wrap callbacks in $scope.$apply. When variables change in $scope.$apply() then the UI can notice them and update.
Since the login is happening through callbacks with $.couch.session then the scope is not noticing any updates to variables. I wrapped it in the apply to fix that.
I will add the events though.
so I added a new event, LOGIN_CHANGE. $on(function(event, $user) {});
if $user.username is null, we are logged out. I'm also firing the login/logout events
Tested OK. Merged. Thanks!
New UI for users
Logged in screenshot:![screenshot](https://f.cloud.github.com/assets/110087/198119/a79e1c12-804f-11e2-9d79-4c3062cabe7c.png)
Includes: html files in editorconfig (probably should do a * to add some defaults) Remove couchapp's login/profile stuff Angular-ui bootstrap init Focus/init-focus directive to trigger focusing on form field Change Password Option Moved enable desktop notifications to account menu
I tried to rebase to make the commit messages a bit cleaner, but rebasing is still very new to me. But couldn't get it to work, so it has a lot of random commit messages. I can redo the branch as a single commit if desired.
Its a pretty hefty change, I'd appreciate a review.