kourosh / tally-old

General Assembly final project
0 stars 0 forks source link

Add administrative privileges (MB) #32

Open kourosh opened 9 years ago

kourosh commented 9 years ago

Need to create a class of users who are allowed to have access to the backend tools. In addition to being a Tally superuser, need to have at least two levels of validation. One level would be "researcher" and another would be "editor." A user with researcher privileges can only create events and politicians in draft mode, but cannot push the pols and events live. Users with editor privileges are allowed to push events and pols live (in addition to being able to push their own pols and events live).

This issue has two tasks:

ikitha commented 9 years ago

I created an admin flag for users. They default to false on sign up. I then authenticated for admins to be able to create, update and delete pols and events. Let me know if this is okay for now. I just read that you wanted these two levels.

So make sure you bundle, migrate, and then in rails console create a user if you haven't signed up, and then add admin = true. save. boom. done. Message me with any questions.

kourosh commented 9 years ago

Refresh my memory. I'm in rails c. How do I create a new user and set the flag to true?

On Fri, Feb 20, 2015 at 12:51 PM, Myla Baker notifications@github.com wrote:

I created an admin flag for users. They default to false on sign up. I then authenticated for admins to be able to create, update and delete pols and events. Let me know if this is okay for now. I just read that you wanted these two levels.

So make sure you bundle, migrate, and then in rails console create a user if you haven't signed up, and then add admin = true. save. boom. done. Message me with any questions.

— Reply to this email directly or view it on GitHub https://github.com/kourosh/tally/issues/32#issuecomment-75316952.

kourosh commented 9 years ago

Never mind. I used the new user registration screen. But when I tried to create myself as a user, here's the error I got:

What's happening?

On Fri, Feb 20, 2015 at 12:51 PM, Myla Baker notifications@github.com wrote:

I created an admin flag for users. They default to false on sign up. I then authenticated for admins to be able to create, update and delete pols and events. Let me know if this is okay for now. I just read that you wanted these two levels.

So make sure you bundle, migrate, and then in rails console create a user if you haven't signed up, and then add admin = true. save. boom. done. Message me with any questions.

— Reply to this email directly or view it on GitHub https://github.com/kourosh/tally/issues/32#issuecomment-75316952.

ikitha commented 9 years ago

I don't have my computer with me today, cant see the error what is it?

On Friday, February 27, 2015, Kourosh Karimkhany notifications@github.com wrote:

Never mind. I used the new user registration screen. But when I tried to create myself as a user, here's the error I got:

What's happening?

On Fri, Feb 20, 2015 at 12:51 PM, Myla Baker <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I created an admin flag for users. They default to false on sign up. I then authenticated for admins to be able to create, update and delete pols and events. Let me know if this is okay for now. I just read that you wanted these two levels.

So make sure you bundle, migrate, and then in rails console create a user if you haven't signed up, and then add admin = true. save. boom. done. Message me with any questions.

— Reply to this email directly or view it on GitHub https://github.com/kourosh/tally/issues/32#issuecomment-75316952.

— Reply to this email directly or view it on GitHub https://github.com/kourosh/tally/issues/32#issuecomment-76455766.

ikitha commented 9 years ago

Were you able to set your status to admin in the rails console?