pekrau / BeerClub

A web application to keep track of the beer accounts for registered members.
3 stars 2 forks source link

Admin Role doesn't work #105

Closed apeltzer closed 4 years ago

apeltzer commented 4 years ago

Hi Per!

after seeing this last week, we wanted to run our own version of the app at QBIC - looking fab and seems to work as expected. Additions were super easy in terms of beverages, members etc pp. Thank you for this!

One minor thing: When I try upgrading a member to admin state - this doesn't work unfortunately, even after clicking save the user stays in "member" status.

apeltzer commented 4 years ago

Okay, seems like I can (as admin) only change this and "upgrade" others to admin roles if I uncomment this line here:

        if self.rqh.current_user['email'] != self['email']: return

in member.py

pekrau commented 4 years ago

Thanks for discovering this. That != should be ==: no user, regardless of role, should be able to change one's own role. I will fix and update the code.

pekrau commented 4 years ago

I am happy that someone is using this app. In spite of the dismal state of the documentation...

apeltzer commented 4 years ago

No worries - thanks for fixing this!

Is it that worse? Didn't take me too long to get it up and running to be honest which means its either designed well or documented well or both ;-)

pekrau commented 4 years ago

Thanks for those nice words!