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

Ft update role and auth #25

Merged
merged 2 commits into from
May 28, 2024
Merged

Ft update role and auth #25

merged 2 commits into from
May 28, 2024

Conversation

mugishaj092
Copy link
Collaborator

What does this PR do?

It lets the admin decide what different users can do by giving them roles, like "admin", "buyer", "seller", etc.

Describe your changes

-Made it possible for the admin to set roles for users.
-Created a special role for the admin itself.
-With this change, only users with specific roles can do certain things.

PR Type

What kind of change does this PR introduce?

[ x ] Feature
[ x ] Documentation content changes
[ x ] Tests

How should this be manually tested?

-pull changes
-Suitch branch (git checkout ft-update-role-and-auth)
-Run server
-http://localhost:3000/api/users/:id

What are the relevant pivotal tracker stories?

Pivotal Tracker Link

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

gitguardian bot commented May 27, 2024

⚠️ GitGuardian has uncovered 8 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
11029277 Triggered Generic Password 344756f src/test/user.test.ts View secret
11029277 Triggered Generic Password 344756f src/test/user.test.ts View secret
11029277 Triggered Generic Password 344756f src/test/user.test.ts View secret
11029277 Triggered Generic Password 344756f src/test/user.test.ts View secret
11029277 Triggered Generic Password 344756f src/test/user.test.ts View secret
11029277 Triggered Generic Password 344756f src/test/user.test.ts View secret
11029277 Triggered Generic Password 344756f src/test/user.test.ts View secret
11029277 Triggered Generic Password 344756f src/test/user.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link
Collaborator

@GabrielDushime GabrielDushime left a comment

Choose a reason for hiding this comment

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

Good Bro

@vegetason vegetason self-requested a review May 27, 2024 12:47
Copy link
Collaborator

@vegetason vegetason left a comment

Choose a reason for hiding this comment

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

I have seen no problem

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

@mugishaj092 mugishaj092 force-pushed the ft-update-role-and-auth branch from aa1d0ac to 9226a1f Compare May 28, 2024 10:27
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link
Collaborator

@kennyg37 kennyg37 left a comment

Choose a reason for hiding this comment

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

Great, good to go

@mugishaj092 mugishaj092 force-pushed the ft-update-role-and-auth branch from 9226a1f to 344756f Compare May 28, 2024 10:48
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm i eslint-plugin-@typescript-eslint@latest --save-dev
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

@furebo furebo merged commit 5d64a5b into main May 28, 2024
6 of 8 checks passed
kennyg37 pushed a commit that referenced this pull request May 31, 2024
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.

6 participants