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:
2025-07-28 23:01:18 +02:00
parent 1ce2088cae
commit 343964eda8
5 changed files with 12 additions and 7 deletions
@@ -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"),