Skip to content

Conversation

chrisjpurdy
Copy link
Contributor

@chrisjpurdy chrisjpurdy commented Nov 21, 2022

This adds the TUTOR role, and changes the semantics of different endpoints to cope with this additional role type.

Front end PR

Tutor welcome email can be found in the content repo(s) as: email_templates/tutor_welcome.json (needs to be copyedited first)


Pull Request Check List

  • Unit Tests & Regression Tests Added (Optional)
  • Removed Unnecessary Logs/System.Outs/Comments/TODOs
  • Added enough Logging to monitor expected behaviour change
  • Security - Data Exposure - PII is not stored or sent unencrypted
  • Security - Data Exposure - Test any altered or created endpoints using swagger
  • Security - Access Control - Check authorisation on every new endpoint
  • Peer-Reviewed
  • Email templates copyedited

@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Base: 25.75% // Head: 26.86% // Increases project coverage by +1.11% 🎉

Coverage data is based on head (da98d26) compared to base (b1b3d42).
Patch coverage: 18.60% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #503      +/-   ##
==========================================
+ Coverage   25.75%   26.86%   +1.11%     
==========================================
  Files         481      481              
  Lines       21932    21919      -13     
  Branches     2723     2720       -3     
==========================================
+ Hits         5649     5889     +240     
+ Misses      15791    15510     -281     
- Partials      492      520      +28     
Impacted Files Coverage Δ
...a/uk/ac/cam/cl/dtg/isaac/api/AssignmentFacade.java 0.00% <0.00%> (ø)
.../java/uk/ac/cam/cl/dtg/isaac/api/EventsFacade.java 12.32% <0.00%> (-0.02%) ⬇️
...va/uk/ac/cam/cl/dtg/isaac/api/IsaacController.java 0.00% <0.00%> (ø)
...cl/dtg/isaac/api/managers/EventBookingManager.java 46.38% <ø> (ø)
...n/java/uk/ac/cam/cl/dtg/segue/api/AdminFacade.java 0.00% <0.00%> (ø)
...ava/uk/ac/cam/cl/dtg/segue/api/QuestionFacade.java 13.13% <0.00%> (ø)
...n/java/uk/ac/cam/cl/dtg/segue/api/UsersFacade.java 0.00% <0.00%> (ø)
.../cl/dtg/segue/api/managers/UserAccountManager.java 23.27% <0.00%> (+1.85%) ⬆️
...dtg/segue/api/managers/UserAssociationManager.java 50.00% <0.00%> (-4.55%) ⬇️
.../java/uk/ac/cam/cl/dtg/segue/api/GroupsFacade.java 9.64% <40.00%> (+9.64%) ⬆️
... and 32 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@chrisjpurdy chrisjpurdy marked this pull request as ready for review November 29, 2022 11:20
public static final String TEST_STUDENT_EMAIL = "test-student@test.com";
public static final String TEST_STUDENT_PASSWORD = "test1234";
public static final long TEST_STUDENT_ID = 6L;

public static final String TEST_TUTOR_EMAIL = "test-tutor@test.com";
public static final String TEST_TUTOR_PASSWORD = "test1234";

Check failure

Code scanning / CodeQL

Hard-coded credential in API call

Hard-coded value flows to [sensitive API call](1).
Comment on lines +65 to +66
PreparedStatement pst = postgresSqlDb.getDatabaseConnection().prepareStatement(
"DELETE FROM group_additional_managers WHERE group_id in (?, ?);");

Check warning

Code scanning / CodeQL

Potential database resource leak

This PreparedStatement is not always closed on method exit.
Copy link
Member

@jsharkey13 jsharkey13 left a comment

Choose a reason for hiding this comment

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

I didn't review the tests at all. A few comments.

@chrisjpurdy chrisjpurdy merged commit a1fac0b into master Jan 6, 2023
@chrisjpurdy chrisjpurdy deleted the tutor-user-role branch January 6, 2023 16:24
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