Allow editing non-SCIM fields on SCIM-managed profiles
Contract start and end dates are never synced by SCIM, so they should remain editable even when a profile is SCIM-managed. The backend now skips overwriting SCIM-synced fields (fullName, kind, position, additionalEmailAddresses) for SCIM profiles, and the frontend disables only those fields instead of the entire form. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -977,10 +977,12 @@ func (s *OrganizationService) UpdateUser(ctx context.Context, req *UpdateUserReq
|
||||
return fmt.Errorf("cannot load profile: %w", err)
|
||||
}
|
||||
|
||||
profile.FullName = req.FullName
|
||||
profile.Kind = req.Kind
|
||||
profile.AdditionalEmailAddresses = req.AdditionalEmailAddresses
|
||||
profile.Position = req.Position
|
||||
if profile.Source != coredata.ProfileSourceSCIM {
|
||||
profile.FullName = req.FullName
|
||||
profile.Kind = req.Kind
|
||||
profile.AdditionalEmailAddresses = req.AdditionalEmailAddresses
|
||||
profile.Position = req.Position
|
||||
}
|
||||
|
||||
if req.ContractStartDate != nil {
|
||||
profile.ContractStartDate = *req.ContractStartDate
|
||||
|
||||
Reference in New Issue
Block a user