Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Where is the code for permission templates?


What information do they hold?

...

  •  participants for an admin set
  •  visibility template for a work created in an admin set
  •  selected workflow to use for works created in an admin set

You can get a good sense of what PTs hold by looking at the PTForm; https://github.com/samvera/hyrax/blob/master/app/forms/hyrax/forms/permission_template_form.rb

When are they created?

I'm guessing that it is when the admin set is created.  And possibly when a work is created to hold participant information?

Yes, permission templates are created by the AdminSetCreateService: https://github.com/samvera/hyrax/blob/master/app/services/hyrax/admin_set_create_service.rb#L62

They can also be created by the DefaultAdminSetActor: https://github.com/samvera/hyrax/blob/master/app/actors/hyrax/actors/default_admin_set_actor.rb#L44


When are they used?

I'm guessing when a work is created, the participants are assigned access, the visibility of the work is set based on the visibility template, and the workflow is attached to the work.

I believe that is correct.

Potential Pitfalls