@@ -46,7 +46,7 @@ type (
|
|||||||
OrganizationName string `db:"organization_name"`
|
OrganizationName string `db:"organization_name"`
|
||||||
UserName *string `db:"user_name"`
|
UserName *string `db:"user_name"`
|
||||||
ExternalID *string `db:"external_id"`
|
ExternalID *string `db:"external_id"`
|
||||||
NickName *string `db:"nick_name"`
|
Nickname *string `db:"nickname"`
|
||||||
Locale *string `db:"locale"`
|
Locale *string `db:"locale"`
|
||||||
Timezone *string `db:"timezone"`
|
Timezone *string `db:"timezone"`
|
||||||
ProfileUrl *string `db:"profile_url"`
|
ProfileUrl *string `db:"profile_url"`
|
||||||
@@ -128,7 +128,7 @@ SELECT
|
|||||||
'' AS organization_name,
|
'' AS organization_name,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -205,7 +205,7 @@ SELECT
|
|||||||
'' AS organization_name,
|
'' AS organization_name,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -285,7 +285,7 @@ SELECT
|
|||||||
'' AS organization_name,
|
'' AS organization_name,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -358,7 +358,7 @@ WITH profiles AS (
|
|||||||
p.contract_end_date,
|
p.contract_end_date,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -401,7 +401,7 @@ SELECT
|
|||||||
'' AS organization_name,
|
'' AS organization_name,
|
||||||
user_name,
|
user_name,
|
||||||
external_id,
|
external_id,
|
||||||
nick_name,
|
nickname,
|
||||||
locale,
|
locale,
|
||||||
timezone,
|
timezone,
|
||||||
profile_url,
|
profile_url,
|
||||||
@@ -471,7 +471,7 @@ WITH profiles AS (
|
|||||||
p.contract_end_date,
|
p.contract_end_date,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -513,7 +513,7 @@ SELECT
|
|||||||
o.name AS organization_name,
|
o.name AS organization_name,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -582,7 +582,7 @@ WITH profiles AS (
|
|||||||
mp.contract_end_date,
|
mp.contract_end_date,
|
||||||
mp.user_name,
|
mp.user_name,
|
||||||
mp.external_id,
|
mp.external_id,
|
||||||
mp.nick_name,
|
mp.nickname,
|
||||||
mp.locale,
|
mp.locale,
|
||||||
mp.timezone,
|
mp.timezone,
|
||||||
mp.profile_url,
|
mp.profile_url,
|
||||||
@@ -628,7 +628,7 @@ SELECT
|
|||||||
'' AS organization_name,
|
'' AS organization_name,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -726,7 +726,7 @@ WITH profiles AS (
|
|||||||
mp.contract_end_date,
|
mp.contract_end_date,
|
||||||
mp.user_name,
|
mp.user_name,
|
||||||
mp.external_id,
|
mp.external_id,
|
||||||
mp.nick_name,
|
mp.nickname,
|
||||||
mp.locale,
|
mp.locale,
|
||||||
mp.timezone,
|
mp.timezone,
|
||||||
mp.profile_url,
|
mp.profile_url,
|
||||||
@@ -772,7 +772,7 @@ SELECT
|
|||||||
'' AS organization_name,
|
'' AS organization_name,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -871,7 +871,7 @@ WITH attendees AS (
|
|||||||
p.contract_end_date,
|
p.contract_end_date,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -916,7 +916,7 @@ SELECT
|
|||||||
'' AS organization_name,
|
'' AS organization_name,
|
||||||
user_name,
|
user_name,
|
||||||
external_id,
|
external_id,
|
||||||
nick_name,
|
nickname,
|
||||||
locale,
|
locale,
|
||||||
timezone,
|
timezone,
|
||||||
profile_url,
|
profile_url,
|
||||||
@@ -996,7 +996,7 @@ SELECT
|
|||||||
'' AS organization_name,
|
'' AS organization_name,
|
||||||
p.user_name,
|
p.user_name,
|
||||||
p.external_id,
|
p.external_id,
|
||||||
p.nick_name,
|
p.nickname,
|
||||||
p.locale,
|
p.locale,
|
||||||
p.timezone,
|
p.timezone,
|
||||||
p.profile_url,
|
p.profile_url,
|
||||||
@@ -1168,7 +1168,7 @@ INSERT INTO
|
|||||||
contract_end_date,
|
contract_end_date,
|
||||||
user_name,
|
user_name,
|
||||||
external_id,
|
external_id,
|
||||||
nick_name,
|
nickname,
|
||||||
locale,
|
locale,
|
||||||
timezone,
|
timezone,
|
||||||
profile_url,
|
profile_url,
|
||||||
@@ -1203,7 +1203,7 @@ VALUES (
|
|||||||
@contract_end_date,
|
@contract_end_date,
|
||||||
@user_name,
|
@user_name,
|
||||||
@external_id,
|
@external_id,
|
||||||
@nick_name,
|
@nickname,
|
||||||
@locale,
|
@locale,
|
||||||
@timezone,
|
@timezone,
|
||||||
@profile_url,
|
@profile_url,
|
||||||
@@ -1240,7 +1240,7 @@ VALUES (
|
|||||||
"contract_end_date": p.ContractEndDate,
|
"contract_end_date": p.ContractEndDate,
|
||||||
"user_name": p.UserName,
|
"user_name": p.UserName,
|
||||||
"external_id": p.ExternalID,
|
"external_id": p.ExternalID,
|
||||||
"nick_name": p.NickName,
|
"nickname": p.Nickname,
|
||||||
"locale": p.Locale,
|
"locale": p.Locale,
|
||||||
"timezone": p.Timezone,
|
"timezone": p.Timezone,
|
||||||
"profile_url": p.ProfileUrl,
|
"profile_url": p.ProfileUrl,
|
||||||
@@ -1293,7 +1293,7 @@ SET
|
|||||||
contract_end_date = @contract_end_date,
|
contract_end_date = @contract_end_date,
|
||||||
user_name = @user_name,
|
user_name = @user_name,
|
||||||
external_id = @external_id,
|
external_id = @external_id,
|
||||||
nick_name = @nick_name,
|
nickname = @nickname,
|
||||||
locale = @locale,
|
locale = @locale,
|
||||||
timezone = @timezone,
|
timezone = @timezone,
|
||||||
profile_url = @profile_url,
|
profile_url = @profile_url,
|
||||||
@@ -1330,7 +1330,7 @@ WHERE
|
|||||||
"contract_end_date": p.ContractEndDate,
|
"contract_end_date": p.ContractEndDate,
|
||||||
"user_name": p.UserName,
|
"user_name": p.UserName,
|
||||||
"external_id": p.ExternalID,
|
"external_id": p.ExternalID,
|
||||||
"nick_name": p.NickName,
|
"nickname": p.Nickname,
|
||||||
"locale": p.Locale,
|
"locale": p.Locale,
|
||||||
"timezone": p.Timezone,
|
"timezone": p.Timezone,
|
||||||
"profile_url": p.ProfileUrl,
|
"profile_url": p.ProfileUrl,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
ALTER TABLE iam_membership_profiles
|
ALTER TABLE iam_membership_profiles
|
||||||
ALTER COLUMN kind TYPE TEXT USING kind::TEXT,
|
ALTER COLUMN kind TYPE TEXT USING kind::TEXT,
|
||||||
ADD COLUMN nick_name TEXT,
|
ADD COLUMN nickname TEXT,
|
||||||
ADD COLUMN locale TEXT,
|
ADD COLUMN locale TEXT,
|
||||||
ADD COLUMN timezone TEXT,
|
ADD COLUMN timezone TEXT,
|
||||||
ADD COLUMN profile_url TEXT;
|
ADD COLUMN profile_url TEXT;
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ func (s *Service) CreateUser(
|
|||||||
Position: &attrs.Title,
|
Position: &attrs.Title,
|
||||||
UserName: &attrs.UserName,
|
UserName: &attrs.UserName,
|
||||||
ExternalID: externalIdPtr,
|
ExternalID: externalIdPtr,
|
||||||
NickName: ref.RefOrNil(attrs.NickName),
|
Nickname: ref.RefOrNil(attrs.Nickname),
|
||||||
Locale: ref.RefOrNil(attrs.Locale),
|
Locale: ref.RefOrNil(attrs.Locale),
|
||||||
Timezone: ref.RefOrNil(attrs.Timezone),
|
Timezone: ref.RefOrNil(attrs.Timezone),
|
||||||
ProfileUrl: ref.RefOrNil(attrs.ProfileUrl),
|
ProfileUrl: ref.RefOrNil(attrs.ProfileUrl),
|
||||||
@@ -250,7 +250,7 @@ func (s *Service) CreateUser(
|
|||||||
profile.Position = &attrs.Title
|
profile.Position = &attrs.Title
|
||||||
profile.UserName = &attrs.UserName
|
profile.UserName = &attrs.UserName
|
||||||
profile.ExternalID = externalIdPtr
|
profile.ExternalID = externalIdPtr
|
||||||
profile.NickName = ref.RefOrNil(attrs.NickName)
|
profile.Nickname = ref.RefOrNil(attrs.Nickname)
|
||||||
profile.Locale = ref.RefOrNil(attrs.Locale)
|
profile.Locale = ref.RefOrNil(attrs.Locale)
|
||||||
profile.Timezone = ref.RefOrNil(attrs.Timezone)
|
profile.Timezone = ref.RefOrNil(attrs.Timezone)
|
||||||
profile.ProfileUrl = ref.RefOrNil(attrs.ProfileUrl)
|
profile.ProfileUrl = ref.RefOrNil(attrs.ProfileUrl)
|
||||||
@@ -532,11 +532,11 @@ func (s *Service) updateUser(
|
|||||||
profile.UpdatedAt = now
|
profile.UpdatedAt = now
|
||||||
}
|
}
|
||||||
|
|
||||||
if attrs.NickName != nil {
|
if attrs.Nickname != nil {
|
||||||
if *attrs.NickName == "" {
|
if *attrs.Nickname == "" {
|
||||||
profile.NickName = nil
|
profile.Nickname = nil
|
||||||
} else {
|
} else {
|
||||||
profile.NickName = attrs.NickName
|
profile.Nickname = attrs.Nickname
|
||||||
}
|
}
|
||||||
profile.UpdatedAt = now
|
profile.UpdatedAt = now
|
||||||
}
|
}
|
||||||
@@ -874,7 +874,7 @@ type scimUserAttributes struct {
|
|||||||
Title string
|
Title string
|
||||||
ExternalID string
|
ExternalID string
|
||||||
UserType string
|
UserType string
|
||||||
NickName string
|
Nickname string
|
||||||
Locale string
|
Locale string
|
||||||
Timezone string
|
Timezone string
|
||||||
ProfileUrl string
|
ProfileUrl string
|
||||||
@@ -953,7 +953,7 @@ func ParseUserFromAttributes(attributes scim.ResourceAttributes) scimUserAttribu
|
|||||||
|
|
||||||
attrs.Title, _ = attributes["title"].(string)
|
attrs.Title, _ = attributes["title"].(string)
|
||||||
attrs.UserType, _ = attributes["userType"].(string)
|
attrs.UserType, _ = attributes["userType"].(string)
|
||||||
attrs.NickName, _ = attributes["nickName"].(string)
|
attrs.Nickname, _ = attributes["nickName"].(string)
|
||||||
attrs.Locale, _ = attributes["locale"].(string)
|
attrs.Locale, _ = attributes["locale"].(string)
|
||||||
attrs.Timezone, _ = attributes["timezone"].(string)
|
attrs.Timezone, _ = attributes["timezone"].(string)
|
||||||
attrs.ProfileUrl, _ = attributes["profileUrl"].(string)
|
attrs.ProfileUrl, _ = attributes["profileUrl"].(string)
|
||||||
@@ -980,7 +980,7 @@ type scimReplaceAttributes struct {
|
|||||||
UserName *string
|
UserName *string
|
||||||
ExternalID *string
|
ExternalID *string
|
||||||
UserType *string
|
UserType *string
|
||||||
NickName *string
|
Nickname *string
|
||||||
Locale *string
|
Locale *string
|
||||||
Timezone *string
|
Timezone *string
|
||||||
ProfileUrl *string
|
ProfileUrl *string
|
||||||
@@ -1049,7 +1049,7 @@ func ParseUserFromReplaceAttributes(attributes scim.ResourceAttributes) scimRepl
|
|||||||
attrs.UserType = &ut
|
attrs.UserType = &ut
|
||||||
}
|
}
|
||||||
if nn, ok := attributes["nickName"].(string); ok {
|
if nn, ok := attributes["nickName"].(string); ok {
|
||||||
attrs.NickName = &nn
|
attrs.Nickname = &nn
|
||||||
}
|
}
|
||||||
if l, ok := attributes["locale"].(string); ok {
|
if l, ok := attributes["locale"].(string); ok {
|
||||||
attrs.Locale = &l
|
attrs.Locale = &l
|
||||||
@@ -1108,7 +1108,7 @@ func ParseUserFromPatchOperations(operations []scim.PatchOperation) scimReplaceA
|
|||||||
case "usertype":
|
case "usertype":
|
||||||
attrs.UserType = &empty
|
attrs.UserType = &empty
|
||||||
case "nickname":
|
case "nickname":
|
||||||
attrs.NickName = &empty
|
attrs.Nickname = &empty
|
||||||
case "locale":
|
case "locale":
|
||||||
attrs.Locale = &empty
|
attrs.Locale = &empty
|
||||||
case "timezone":
|
case "timezone":
|
||||||
@@ -1209,7 +1209,7 @@ func ParseUserFromPatchOperations(operations []scim.PatchOperation) scimReplaceA
|
|||||||
attrs.UserType = &ut
|
attrs.UserType = &ut
|
||||||
}
|
}
|
||||||
if nn, ok := valueMap["nickName"].(string); ok {
|
if nn, ok := valueMap["nickName"].(string); ok {
|
||||||
attrs.NickName = &nn
|
attrs.Nickname = &nn
|
||||||
}
|
}
|
||||||
if l, ok := valueMap["locale"].(string); ok {
|
if l, ok := valueMap["locale"].(string); ok {
|
||||||
attrs.Locale = &l
|
attrs.Locale = &l
|
||||||
@@ -1380,7 +1380,7 @@ func ParseUserFromPatchOperations(operations []scim.PatchOperation) scimReplaceA
|
|||||||
}
|
}
|
||||||
case "nickname":
|
case "nickname":
|
||||||
if nn, ok := op.Value.(string); ok {
|
if nn, ok := op.Value.(string); ok {
|
||||||
attrs.NickName = &nn
|
attrs.Nickname = &nn
|
||||||
}
|
}
|
||||||
case "locale":
|
case "locale":
|
||||||
if l, ok := op.Value.(string); ok {
|
if l, ok := op.Value.(string); ok {
|
||||||
@@ -1519,7 +1519,7 @@ func userToResource(p *coredata.MembershipProfile) scim.Resource {
|
|||||||
},
|
},
|
||||||
"title": p.Position,
|
"title": p.Position,
|
||||||
"userType": string(ref.UnrefOrZero(p.Kind)),
|
"userType": string(ref.UnrefOrZero(p.Kind)),
|
||||||
"nickName": ref.UnrefOrZero(p.NickName),
|
"nickName": ref.UnrefOrZero(p.Nickname),
|
||||||
"locale": ref.UnrefOrZero(p.Locale),
|
"locale": ref.UnrefOrZero(p.Locale),
|
||||||
"timezone": ref.UnrefOrZero(p.Timezone),
|
"timezone": ref.UnrefOrZero(p.Timezone),
|
||||||
"profileUrl": ref.UnrefOrZero(p.ProfileUrl),
|
"profileUrl": ref.UnrefOrZero(p.ProfileUrl),
|
||||||
|
|||||||
Reference in New Issue
Block a user