Add server.address property and update issuer field in LoginController to use dynamic server address. Modify SQL query in PrivilegedUserMapper to simplify permissions retrieval.
This commit is contained in:
+5
-6
@@ -11,14 +11,13 @@ public interface PrivilegedUserMapper {
|
||||
/**
|
||||
* Retrieves a user by their UUID along with their permissions
|
||||
* @param uuid The UUID of the user to retrieve
|
||||
* @return The PrivilegedUser with their permissions, or null if not found
|
||||
* @return The optional PrivilegedUser with their permissions
|
||||
*/
|
||||
@Select("""
|
||||
SELECT privileged_users.id, privileged_users.uuid, privileges.privileges as permission
|
||||
FROM privileged_users
|
||||
LEFT JOIN privileges ON privileged_users.id = privileges.user_id
|
||||
WHERE privileged_users.uuid = #{uuid}
|
||||
""")
|
||||
SELECT id, uuid
|
||||
FROM privileged_users
|
||||
WHERE uuid = #{uuid}
|
||||
""")
|
||||
@Results({
|
||||
@Result(property = "id", column = "id"),
|
||||
@Result(property = "uuid", column = "uuid"),
|
||||
|
||||
Reference in New Issue
Block a user