package com.cameleer.server.core.rbac;

import java.util.List;
import java.util.UUID;

public interface RbacService {
    List<UserDetail> listUsers();
    UserDetail getUser(String userId);
    void assignRoleToUser(String userId, UUID roleId);
    void removeRoleFromUser(String userId, UUID roleId);
    void addUserToGroup(String userId, UUID groupId);
    void removeUserFromGroup(String userId, UUID groupId);
    List<RoleSummary> getDirectRolesForUser(String userId);
    List<RoleSummary> getEffectiveRolesForUser(String userId);
    List<GroupSummary> getEffectiveGroupsForUser(String userId);
    List<RoleSummary> getEffectiveRolesForGroup(UUID groupId);
    List<UserSummary> getEffectivePrincipalsForRole(UUID roleId);
    List<String> getSystemRoleNames(String userId);
    RbacStats getStats();
    void clearManagedAssignments(String userId);
    void assignManagedRole(String userId, UUID roleId, UUID mappingId);
    void addUserToManagedGroup(String userId, UUID groupId, UUID mappingId);
}
