kanso/users — pull request #1 by jimklo (2012-05-25 16:51:53+00:00)
Title: Check to see if current user making updates is in _admin before promoting/demoting updated user to _admin

When using the users module in situations where a user could be, say updating their profile. The user is probably not an admin. Errors were being thrown after the update occurred because the the save routine doesn't check if the user making the modification to the user record has permissions to do things (make admin user, delete from admin users).

This modification adds an additional dependency upon "session" module which is used after the initial user save to verify if the current user has _admin permissions in order to elevate/demote user to system _admin.