92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# File 'lib/raws/s3/acl.rb', line 92
def initialize(grants)
super()
grants.each do |grant|
grantee, permission = grant['Grantee'], grant['Permission']
if id = grantee['ID']
push ID.new(id, permission, grantee['DisplayName'])
elsif email = grantee['EmailAddress']
push Email.new(email, permission)
else
case grantee['URI']
when 'http://acs.amazonaws.com/groups/global/AuthenticatedUsers'
push AuthenticatedUsers.new(permission)
when 'http://acs.amazonaws.com/groups/global/AllUsers'
push AllUsers.new(permission)
end
end
end
end
|