Files
ubicloud/serializers/project_invitation.rb
Enes Cakir c265c6be4a Allow to select a policy while inviting a user
If the user invited to the project, but doesn't have an account at
Ubicloud, we persist the invitation until they create one.

With this PR, the inviter can select a policy while inviting an user.
Once the invited user creates an account, we append them to the existing
policy's subjects list instead of replacing the entire list.

Additionally, the policy for the invited user can be updated.
2024-10-10 16:27:55 +03:00

12 lines
260 B
Ruby

# frozen_string_literal: true
class Serializers::ProjectInvitation < Serializers::Base
def self.serialize_internal(pi, options = {})
{
email: pi.email,
expires_at: pi.expires_at.strftime("%B %d, %Y"),
policy: pi.policy
}
end
end