improving user profile and user details

This commit is contained in:
Jörg Prante 2024-06-04 15:35:01 +02:00
parent 14f5bb29e8
commit ebf8e781c8
3 changed files with 21 additions and 6 deletions

View file

@ -1,3 +1,3 @@
group = org.xbib group = org.xbib
name = net name = net
version = 4.6.1 version = 4.7.0

View file

@ -9,9 +9,6 @@ public final class UserDetails {
private String effectiveUserId; private String effectiveUserId;
public UserDetails() { public UserDetails() {
this.name = "";
this.userId = "";
this.effectiveUserId = "";
} }
public void setName(String name) { public void setName(String name) {

View file

@ -5,9 +5,21 @@ import java.util.Map;
public interface UserProfile { public interface UserProfile {
void setName(String name); String USER_ID = "user_id";
String getName(); String EFFECTIVE_USER_ID = "e_user_id";
String NAME = "name";
String ROLES = "roles";
String EFFECTIVE_ROLES = "e_roles";
String PERMISSIONS = "perms";
String EFFECTIVE_PERMISSIONS = "e_perms";
String ATTRIBUTES = "attrs";
void setUserId(String uid); void setUserId(String uid);
@ -17,6 +29,10 @@ public interface UserProfile {
String getEffectiveUserId(); String getEffectiveUserId();
void setName(String name);
String getName();
void addRole(String role); void addRole(String role);
void setRoles(Collection<String> roles); void setRoles(Collection<String> roles);
@ -43,6 +59,8 @@ public interface UserProfile {
void setAttributes(Attributes attributes); void setAttributes(Attributes attributes);
void updateAttribute(String key, Object value);
Attributes getAttributes(); Attributes getAttributes();
Map<String, Object> asMap(); Map<String, Object> asMap();