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.
12 lines
260 B
Ruby
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
|