spec/apps/dummy/app/models/mock_user.rb in scimitar-2.7.3 vs spec/apps/dummy/app/models/mock_user.rb in scimitar-2.8.0
- old
+ new
@@ -94,10 +94,11 @@
# Custom extension schema - see configuration in
# "spec/apps/dummy/config/initializers/scimitar.rb".
#
organization: :organization,
department: :department,
+ primaryEmail: :scim_primary_email,
userGroups: [
{
list: :mock_groups,
find_with: ->(value) { MockGroup.find(value["value"]) },
using: {
@@ -122,11 +123,17 @@
'name.familyName' => { column: :last_name },
'groups' => { column: MockGroup.arel_table[:id] },
'groups.value' => { column: MockGroup.arel_table[:id] },
'emails' => { columns: [ :work_email_address, :home_email_address ] },
'emails.value' => { columns: [ :work_email_address, :home_email_address ] },
- 'emails.type' => { ignore: true } # We can't filter on that; it'll just search all e-mails
+ 'emails.type' => { ignore: true }, # We can't filter on that; it'll just search all e-mails
+ 'primaryEmail' => { column: :scim_primary_email },
}
+ end
+
+ # reader
+ def scim_primary_email
+ work_email_address
end
include Scimitar::Resources::Mixin
end