package permissions // 🔥 SYSTEM / ADMIN ROLE IDS var AdminRoleIDs = map[int]struct{}{ 1: {}, 3: {}, } // ------------------------------------------------------- // 🧠 ROLE POLICY // ------------------------------------------------------- func ResolveEffectiveRoles( roleIDs []int, ) (effectiveRoleIDs []int, isAdmin bool) { roleMap := make(map[int]struct{}) for _, roleID := range roleIDs { // 🔥 SYSTEM / ADMIN OVERRIDE (1,3,…) if _, ok := AdminRoleIDs[roleID]; ok { return []int{roleID}, true } roleMap[roleID] = struct{}{} } for id := range roleMap { effectiveRoleIDs = append(effectiveRoleIDs, id) } return effectiveRoleIDs, false }