fixed an idp guest role default assignment

This commit is contained in:
Roman Perekhod
2024-11-07 17:57:01 +01:00
parent d65f073c1c
commit 3a060331f7
5 changed files with 27 additions and 5 deletions
@@ -106,6 +106,9 @@ func (m createHome) getUserRoles(user *userv1beta1.User) ([]string, error) {
}
func (m createHome) checkRoleQuotaLimit(roleIDs []string) (uint64, bool) {
if len(roleIDs) == 0 {
return 0, false
}
id := roleIDs[0] // At the moment a user can only have one role.
quota, ok := m.roleQuotas[id]
return quota, ok