We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9969421 commit b9cb1dbCopy full SHA for b9cb1db
user/rest.go
@@ -185,8 +185,10 @@ func (i *Identity) UserType() userpb.UserType {
185
case "Secondary":
186
return userpb.UserType_USER_TYPE_SECONDARY
187
case "Person":
188
- if i.Source == "cern" && i.ActiveUser {
189
- // this is a CERN account; incidentally, also i.UID > 0 qualifies for that
+ if i.Source == "cern" && i.UID > 0 {
+ // this is a CERN account; here we should check if i.ActiveUser = true,
190
+ // but users that have just left the Organization have ActiveUser = false,
191
+ // whereas users with UID = 0 are definitely non-primary.
192
return userpb.UserType_USER_TYPE_PRIMARY
193
}
194
return userpb.UserType_USER_TYPE_LIGHTWEIGHT // external user
0 commit comments