<% unless defined?(asset_id) %> <% asset_id = params[:asset_id] %> <% end %>
Group Permissions <% choices = [{"No Access"=>"none"},{"Discover" => "discover"}, {"Read & Download" => "read"}, {"Edit & Upload" => "edit"}] %> <% roles = RoleMapper.role_names %> <%# This next line should be conditional upon a person having Publish permissions on the object's collection %> <% roles << "public" %> <% roles.each do |role| %> <% role_permissions = @document_fedora.datastreams_in_memory["rightsMetadata"].permissions({"group"=>role}) %> <% field_name = "#{role}_group_access" %>

" class="permissions">

<% end %>
Individual Permissions <% choices = [{"Discover" => "discover"}, {"Read & Download" => "read"}, {"Edit & Upload" => "edit"}] %> <% individual_permissions = {} %> <% choices.each do |choice| %> <% choice_name = choice.values.first %> <% individual_permissions[choice_name] = get_values_from_datastream(@document_fedora,"rightsMetadata", ["#{choice_name}_access".to_sym, :person]) %> <% end %> <%= render :partial=>"permissions/edit_person_permissions.html", :collection=>@document_fedora.datastreams_in_memory["rightsMetadata"].find_by_terms(:access, :person) %>