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 user group management #2268

Merged
merged 6 commits into from
Aug 6, 2024
Merged

Conversation

dakota002
Copy link
Contributor

Description

Adds admin pages for managing user's group associations

Testing

Ran locally, tested adding/removing groups that user's belong to

@dakota002 dakota002 requested a review from lpsinger May 10, 2024 14:06
app/routes/admin.users._index.tsx Outdated Show resolved Hide resolved
app/routes/admin.tsx Outdated Show resolved Hide resolved
app/lib/cognito.server.ts Outdated Show resolved Hide resolved
app/lib/cognito.server.ts Show resolved Hide resolved
app/lib/cognito.server.ts Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
app/routes/admin.users._index.tsx Outdated Show resolved Hide resolved
app/routes/api.circulars.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 4.16667% with 184 lines in your changes missing coverage. Please review.

Project coverage is 5.22%. Comparing base (46ec6cc) to head (160670f).
Report is 25 commits behind head on main.

Files Patch % Lines
app/routes/admin.users.$userId.tsx 0.00% 43 Missing ⚠️
app/components/UserLookup.tsx 0.00% 31 Missing ⚠️
app/routes/api.users.ts 0.00% 29 Missing ⚠️
app/lib/cognito.server.ts 22.85% 27 Missing ⚠️
app/routes/admin.users._index.tsx 0.00% 22 Missing ⚠️
app/routes/admin.tsx 0.00% 11 Missing ⚠️
...pp/routes/user.endorsements/endorsements.server.ts 0.00% 6 Missing ⚠️
app/routes/circulars.correction.$circularId.tsx 0.00% 3 Missing ⚠️
app/email-incoming/circulars/index.ts 0.00% 2 Missing ⚠️
app/root.tsx 0.00% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #2268      +/-   ##
========================================
- Coverage   5.27%   5.22%   -0.06%     
========================================
  Files        157     163       +6     
  Lines       3906    4042     +136     
  Branches     419     439      +20     
========================================
+ Hits         206     211       +5     
- Misses      3699    3830     +131     
  Partials       1       1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Adds some checks that the user is an admin

Adds more checks for user group

Update app/routes/admin.users._index.tsx

Co-authored-by: Leo Singer <leo.p.singer@nasa.gov>

Co-authored-by: Leo Singer <leo.p.singer@nasa.gov>

Update app/lib/cognito.server.ts

Co-authored-by: Leo Singer <leo.p.singer@nasa.gov>

Update app/routes/admin.users.$userId.tsx

Co-authored-by: Leo Singer <leo.p.singer@nasa.gov>

Refactors and simplifications
app/lib/cognito.server.ts Show resolved Hide resolved
app/lib/cognito.server.ts Outdated Show resolved Hide resolved
app/lib/cognito.server.ts Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
app/routes/admin.users._index.tsx Outdated Show resolved Hide resolved
app/lib/cognito.server.ts Outdated Show resolved Hide resolved
@dakota002 dakota002 requested a review from lpsinger July 31, 2024 16:40
@dakota002
Copy link
Contributor Author

Actually still making changes

…x string comparisons to check against same cases
@dakota002
Copy link
Contributor Author

Okay now it is ready

app/components/UserLookup.tsx Show resolved Hide resolved
app/components/UserLookup.tsx Outdated Show resolved Hide resolved
app/components/UserLookup.tsx Outdated Show resolved Hide resolved
app/components/UserLookup.tsx Outdated Show resolved Hide resolved
app/routes/api.users.ts Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
@dakota002 dakota002 requested a review from lpsinger August 2, 2024 19:36
@dakota002 dakota002 self-assigned this Aug 5, 2024
app/lib/cognito.server.ts Outdated Show resolved Hide resolved
app/routes/admin.users.$userId.tsx Outdated Show resolved Hide resolved
@dakota002 dakota002 requested a review from lpsinger August 6, 2024 13:28
@lpsinger lpsinger merged commit 0392d5e into nasa-gcn:main Aug 6, 2024
12 checks passed
@dakota002 dakota002 deleted the AdminUserGroups branch August 6, 2024 17:53
Vidushi-GitHub pushed a commit to Vidushi-GitHub/gcn.nasa.gov that referenced this pull request Oct 13, 2024
Vidushi-GitHub pushed a commit to Vidushi-GitHub/gcn.nasa.gov that referenced this pull request Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants