Fix: Admin club management 500 error - JWT clubs claim format
- Fix clubs attribute in Keycloak to contain only UUIDs (removed role names) - Add defensive error handling in ClubService.GetMyClubsAsync() - Add logging for debugging club retrieval issues - Return empty list instead of 500 error on failures Fixes: Admin users can now manage clubs without contact admin error
This commit is contained in:
@@ -150,11 +150,11 @@ data:
|
||||
"realmRoles": [
|
||||
"admin"
|
||||
],
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383,Admin,3b4afcfa-1352-8fc7-b497-8ab52a0d5fda,Member"
|
||||
]
|
||||
}
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383,3b4afcfa-1352-8fc7-b497-8ab52a0d5fda"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "manager@test.com",
|
||||
@@ -172,11 +172,11 @@ data:
|
||||
"realmRoles": [
|
||||
"manager"
|
||||
],
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383,Manager"
|
||||
]
|
||||
}
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "member1@test.com",
|
||||
@@ -194,11 +194,11 @@ data:
|
||||
"realmRoles": [
|
||||
"member"
|
||||
],
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383,Member,3b4afcfa-1352-8fc7-b497-8ab52a0d5fda,Member"
|
||||
]
|
||||
}
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383,3b4afcfa-1352-8fc7-b497-8ab52a0d5fda"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "member2@test.com",
|
||||
@@ -216,11 +216,11 @@ data:
|
||||
"realmRoles": [
|
||||
"member"
|
||||
],
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383,Member"
|
||||
]
|
||||
}
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"username": "viewer@test.com",
|
||||
@@ -238,11 +238,11 @@ data:
|
||||
"realmRoles": [
|
||||
"viewer"
|
||||
],
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383,Viewer"
|
||||
]
|
||||
}
|
||||
"attributes": {
|
||||
"clubs": [
|
||||
"64e05b5e-ef45-81d7-f2e8-3d14bd197383"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user