ComputerScienceHouse / WebDrink-2.0

Rewrite of CSH WebDrink. Includes updated interface and new API.
https://webdrink.csh.rit.edu
10 stars 6 forks source link

Non-Drink Admin editing drinks #53

Closed hplewis closed 9 years ago

hplewis commented 9 years ago

I didn't try actually saving anything, but it gives me the option to edit slots for Little Drink, Big Drink, and Snack. webdrink_bug

bencentra commented 9 years ago

I'm assuming something changed recently (Angular 1.2 -> 1.3? My API's JSON encoding? LDAP somethings?), or I'm just a super-noob and all the users are very complacent/inattentive. Regardless, adding strict type checking for $scope.current_user.admin did the trick (current_user.admin === "1").

The admin dropdown and edit buttons should be hid from regular users once again: https://github.com/bencentra/WebDrink-2.0/commit/305901f3d75a289829289263dd5c7e7e84b36134. The fix has been pushed.