-
Notifications
You must be signed in to change notification settings - Fork 7
Tutor user role #503
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
Tutor user role #503
Conversation
Codecov ReportBase: 25.75% // Head: 26.86% // Increases project coverage by
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
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. |
Or rather, via anywhere but the dedicated "change user role" endpoint
Also prevents tutors from adding other group managers.
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
PreparedStatement pst = postgresSqlDb.getDatabaseConnection().prepareStatement( | ||
"DELETE FROM group_additional_managers WHERE group_id in (?, ?);"); |
Check warning
Code scanning / CodeQL
Potential database resource leak
Is the attribute is false, this should be disallowed
There was a problem hiding this 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.
src/main/java/uk/ac/cam/cl/dtg/segue/api/managers/UserAccountManager.java
Outdated
Show resolved
Hide resolved
…nto tutor-user-role
Add checking teacher-level permissions as a specific function (as opposed to an implied construct beforehand), and disallow students from seeing other users data.
…ac-api into tutor-user-role
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