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

[dashboard] Allow granting a user 20 extra hours from the admin dashboard #3929

Merged
merged 2 commits into from
Apr 14, 2021

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Apr 14, 2021

Fixes #3511.

Has no effect on Core / OSS.

How to test:

  • In a IO context, go to the Admin panel*, and search for your user
  • Click on "Grant 20h", and confirm that this adds 20h to your balance

*Reminder: If you need to set yourself as admin:

  • Open the IO branch in Gitpod
  • Run kubectl port-forward statefulset/mysql 3306 & and then mysql -h 127.0.0.1 -p (the password is test)
  • Run use gitpod and then select id, name, rolesOrPermissions from d_b_user; (this shows your user ID)
  • Run update d_b_user set rolesOrPermissions = '["admin"]' where id = <ID>; (where <ID> is your user ID)
  • You're now admin 🎉

components/dashboard/src/admin/UserDetail.tsx Outdated Show resolved Hide resolved
Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
@jankeromnes jankeromnes merged commit 6e4fe1c into main Apr 14, 2021
@jankeromnes jankeromnes deleted the jx/grant-20h branch April 14, 2021 11:03
MatthewFagan pushed a commit to trilogy-group/gitpod that referenced this pull request Nov 2, 2021
…oard (gitpod-io#3929)

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
MatthewFagan pushed a commit to trilogy-group/gitpod that referenced this pull request Nov 10, 2021
…oard (gitpod-io#3929)

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
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.

[admin dashboard] User: Add button to grant n Gitpod Hours as one-time credit
2 participants