From 69fff8cfa5158d6e68e64ee2fab64935ca3ecc0e Mon Sep 17 00:00:00 2001 From: Peter Bouda Date: Mon, 14 Oct 2024 09:44:16 +0100 Subject: [PATCH] DEV: Remove mapping of name attribute in User --- plugin.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugin.rb b/plugin.rb index a724455..d2e3604 100644 --- a/plugin.rb +++ b/plugin.rb @@ -50,9 +50,6 @@ after_initialize do id: :id, userName: :username, displayName: :name, - name: { - formatted: :name - }, emails: [ { match: "type", @@ -126,7 +123,7 @@ after_initialize do }, find_with: -> (scim_list_entry) { 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 when 'user' @@ -134,7 +131,9 @@ after_initialize do when 'group' Group.find_by_id(id) 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 } ]