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

Admin role #345

Merged
merged 12 commits into from
Nov 28, 2024
Merged

Admin role #345

merged 12 commits into from
Nov 28, 2024

Conversation

benjaminpjones
Copy link
Collaborator

This adds the admin role and one elevated privilege: the ability to make another user an admin.

Screencast_20241123_232459.webm

A couple required, but not directly related changes:

  • Created User page, where we add the "Make Admin" button
  • Fixed up some User types:
    • id should be required in UserResponse, except for DB code
    • Some instances of Userchanged to UserResponse.
      • I think these are generally interchangeable (except for the optional id issue). I should follow up to merge the two.

packages/server/src/api.ts Show resolved Hide resolved
packages/vue-client/src/requests.ts Outdated Show resolved Hide resolved
packages/vue-client/src/requests.ts Outdated Show resolved Hide resolved
packages/shared/src/api_types.ts Show resolved Hide resolved
@benjaminpjones benjaminpjones mentioned this pull request Nov 25, 2024
@benjaminpjones
Copy link
Collaborator Author

Updates:

  • much DRYer requests
  • fix watchEffect issue
  • register success in the UI by updaing user.value

Copy link
Collaborator

@merowin merowin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though I'm not an expert on security, it looks good to me. Nice job! 😄

I left a couple of thoughts, but nothing important.

packages/server/src/api.ts Outdated Show resolved Hide resolved
packages/vue-client/src/requests.ts Show resolved Hide resolved
packages/server/src/api.ts Show resolved Hide resolved
@benjaminpjones benjaminpjones merged commit c53b04a into main Nov 28, 2024
3 checks passed
@benjaminpjones benjaminpjones deleted the admin2 branch November 28, 2024 00:31
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.

3 participants