Closed sdaigle2 closed 8 years ago
On the admin page
if (userType <> superAdmin) and (discount >25) { //display a message that says "As an admin, you may only create discount codes no greater than 25%. Please contact Chris, Danny, or Cesar for approval to create a larger discount. //do not create the discount }
Fixed with: ed64b695fa4fc5fa09db5e4d4d5bf0f5906a0486. Good job @as-david-m
We noticed a new error with permissions for Super Admins
0.) Set your environment variables so that you are using the testing cloudant database. intelliwheels-testing and 9T4Ejs2fFHu6 Once that's done, start the server and go to localhost:8080 1.) Log in as a superAdmin. You can optionally use the username sdaigle2@gmail.com and the password wheelchair34 2.) Click on Admin in the the top menu 3.) Click on Discounts in the left menu 4.) Click on Create a new discount in the left menu 5.) Attempt to create a new discount for 30%. Notice that it gives you an error message. Since you are a SuperAdmin, you should not have received this error message, but you do.
1) User type Admin can create discounts <=25%. If they try to create a discount >25% they should receive the error message. 2) User type SuperAdmin can create discounts of any amount. They should never see the error message unless something goes wrong while communicating with the database.
Added fix with https://github.com/IntelliWheelsInc/Abacus-mvp/pull/84
Assigned to scott