Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rake task to promote users to admin #405

Merged
merged 1 commit into from Mar 4, 2020

Conversation

angristan
Copy link
Contributor

Fix #398

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 61.709% when pulling b989c1b on angristan:rake-task-make-admin into 408dd60 on feedbin:master.

@angristan
Copy link
Contributor Author

Hi 👋 Just wanted to bump this in case it went under your radar

@benubois
Copy link
Member

benubois commented Mar 4, 2020 via email

@angristan
Copy link
Contributor Author

How would you implement this? You would add a check during the startup that would do a User.find().update() if the variable is set? To me, there are some drawbacks to this method:

  • It adds yet another env variable
  • It doesn't really belong there since it ends up altering the database, env should be for configuration only
  • It adds instructions to the boot process
  • It requires a restart to add an admin (and more if you make a typo)
  • It's pretty easy to add support for removing an admin to the rake task, but with an env variables you would have to add more checks or another variable

What do you think?

@benubois
Copy link
Member

benubois commented Mar 4, 2020

Whoops replied to the wrong thing! Sorry.

@benubois benubois merged commit c8ed653 into feedbin:master Mar 4, 2020
@benubois
Copy link
Member

benubois commented Mar 4, 2020

Thanks!

@angristan
Copy link
Contributor Author

Oh yeah if you were talking about #406, that would make more sense 😄 No problem!

@benubois
Copy link
Member

benubois commented Mar 4, 2020 via email

bluengreen pushed a commit to bluengreen/feedbin that referenced this pull request Jun 26, 2021
Add rake task to promote users to admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promoting user to admin status
3 participants