DEV: Remove mapping of name attribute in User
This commit is contained in:
parent
61e62d07d6
commit
69fff8cfa5
1 changed files with 4 additions and 5 deletions
|
@ -50,9 +50,6 @@ after_initialize do
|
||||||
id: :id,
|
id: :id,
|
||||||
userName: :username,
|
userName: :username,
|
||||||
displayName: :name,
|
displayName: :name,
|
||||||
name: {
|
|
||||||
formatted: :name
|
|
||||||
},
|
|
||||||
emails: [
|
emails: [
|
||||||
{
|
{
|
||||||
match: "type",
|
match: "type",
|
||||||
|
@ -126,7 +123,7 @@ after_initialize do
|
||||||
},
|
},
|
||||||
find_with: -> (scim_list_entry) {
|
find_with: -> (scim_list_entry) {
|
||||||
id = scim_list_entry['value']
|
id = scim_list_entry['value']
|
||||||
type = scim_list_entry['type' ] || 'User' # Some online examples omit 'type' and believe 'User' will be assumed
|
type = scim_list_entry['type' ] || 'User'
|
||||||
|
|
||||||
case type.downcase
|
case type.downcase
|
||||||
when 'user'
|
when 'user'
|
||||||
|
@ -134,7 +131,9 @@ after_initialize do
|
||||||
when 'group'
|
when 'group'
|
||||||
Group.find_by_id(id)
|
Group.find_by_id(id)
|
||||||
else
|
else
|
||||||
raise Scimitar::InvalidSyntaxError.new("Unrecognised type #{type.inspect}")
|
# TODO: Decide what to do here, I added User to be able to use scim-tester
|
||||||
|
User.find_by_id(id)
|
||||||
|
# raise Scimitar::InvalidSyntaxError.new("Unrecognised type #{type.inspect}")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue