Skip to content

Commit

Permalink
rest: extend lightweight/external account cases to users with null uids
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Sep 17, 2024
1 parent c4eb9c0 commit aa7e67b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions user/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ func (i *Identity) UserType() userpb.UserType {
case "Secondary":
return userpb.UserType_USER_TYPE_SECONDARY
case "Person":
if i.Source == "cern" {
return userpb.UserType_USER_TYPE_PRIMARY
if i.Source == "cern" && i.UID > 0 {
return userpb.UserType_USER_TYPE_PRIMARY // CERN user
}
return userpb.UserType_USER_TYPE_LIGHTWEIGHT
return userpb.UserType_USER_TYPE_LIGHTWEIGHT // external user
default:
return userpb.UserType_USER_TYPE_INVALID
}
Expand Down

0 comments on commit aa7e67b

Please sign in to comment.