-
Couldn't load subscription status.
- Fork 0
S28-3980 What's this UUID #1114
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
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # infrastructure/main.tf
Plan Result (stg)
|
Plan Result (prod)
|
| description = "Checks if a UUID exists in any of the tables: User, Recording, CaptureSession, " | ||
| + "Booking, Case, Court.") | ||
| public ResponseEntity<String> checkUuidExists(@PathVariable UUID id) { | ||
| return ResponseEntity.ok("Uuid relates to a " + adminService.findUuidType(id)); |
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.
We send back a pure string don't know if you want us to change to a valid json?
| */ | ||
| @Getter | ||
| public enum UuidTableType { | ||
| USER, |
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.
app_access and portal_access would be useful too, as these are the X-User-Ids that sometimes pop up in e.g. the audit table
| - description: The User Id of the User making the request | ||
| format: uuid | ||
| in: header | ||
| name: X-User-Id |
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.
beware: user ID and X-User-Id are not quite the same. User ID = ID from users table. X-User-ID = ID from app_access or portal_access table. Or at least should be in theory, they do get a little bit interchanged.
| */ | ||
| public Optional<String> findUuidType(UUID id) { | ||
| String query = """ | ||
| (SELECT 'user' AS table_name FROM users WHERE id = ? |
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.
We might need to optimise this if it gets slow, but we can do that at a later date
|
Ticket on hold - to review later |
JIRA ticket(s)
Change description
Adds Super User Admin endpoint for developer investigation