Refactor user privilege handling to use Optional instead of null checks. Remove unused cache entries and update security configuration to refine access controls.
This commit is contained in:
+3
-1
@@ -1,8 +1,10 @@
|
||||
package com.alttd.altitudeweb.database.web_db;
|
||||
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface PrivilegedUserMapper {
|
||||
|
||||
@@ -23,7 +25,7 @@ public interface PrivilegedUserMapper {
|
||||
@Result(property = "permissions", column = "id", javaType = List.class,
|
||||
many = @Many(select = "getPermissionsForUser"))
|
||||
})
|
||||
PrivilegedUser getUserByUuid(@Param("uuid") String uuid);
|
||||
Optional<PrivilegedUser> getUserByUuid(@Param("uuid") String uuid);
|
||||
|
||||
/**
|
||||
* Retrieves all privileged users with their permissions
|
||||
|
||||
Reference in New Issue
Block a user