samvera-labs / nurax-pg

This is a Hyrax application configured to use Postgres for metadata storage instead of ActiveFedora.
Apache License 2.0
0 stars 0 forks source link

reinstate roles in role_map.yml #38

Closed elrayle closed 2 years ago

elrayle commented 2 years ago

Creating a work falls over if this file does not include role definitions.

web_1         | Completed 500 Internal Server Error in 846ms (ActiveRecord: 12.4ms)
web_1         |
web_1         |
web_1         |
web_1         | ActionView::Template::Error (config/role_map.yml was found, but was blank or malformed.
web_1         | ):
web_1         |     18:   </legend>
web_1         |     19:   <div class="col-sm-9 form-inline">
web_1         |     20:     <label for="new_group_name_skel" class="sr-only"><%= t(".group") %></label>
web_1         |     21:     <%= select_tag 'new_group_name_skel', options_for_select(["Select a group"] + available_user_groups(ability: current_ability)), class: 'form-control' %>
web_1         |     22:     <label for="new_group_permission_skel" class="sr-only"><%= t(".access_type_to_grant") %></label>
web_1         |     23:     <%= select_tag 'new_group_permission_skel', options_for_select(configured_permission_options), class: 'form-control' %>
web_1         |     24:
web_1         |
web_1         | hydra-access-controls (11.0.7) lib/hydra/role_mapper_behavior.rb:75:in `load_role_map'
web_1         | hydra-access-controls (11.0.7) lib/hydra/role_mapper_behavior.rb:33:in `map'
web_1         | hydra-access-controls (11.0.7) lib/hydra/role_mapper_behavior.rb:7:in `role_names'
web_1         | /usr/local/bundle/bundler/gems/hyrax-77f73f3faf1c/app/helpers/hyrax/hyrax_helper_behavior.rb:26:in `available_user_groups'
web_1         | /usr/local/bundle/bundler/gems/hyrax-77f73f3faf1c/app/views/hyrax/base/_form_share.html.erb:21:in `__usr_local_bundle_bundler_gems_hyrax___f__f_faf_c_app_views_hyrax_base__form_share_html_erb__3422479296656769522_480620'