Skip to content

3. Structure of Seek code

Alain Becam edited this page Feb 8, 2023 · 3 revisions

One really important aspect of Seek is that what is available through the interface generally match the model of Seek, and the elements you see in the Browse or Create menu, and their organization are the main components of the models.

Most other models are used by these main models: for instance Sample_attribute can be defined in a sample_type, while Controlled_Vocabulary can be used by Sample_attribute.

A lot of the work is done by concerns, act_as_, together with parent classes - mainly ApplicationRecord for the models, ApplicationControllers for the controllers - and common classes used via include and generally part of the Seek library, and so in the Lib folder.

Where are the other things

The common elements are in libs, while the apps contains the application by itself, the MVC elements, the helpers, but also the different jobs, the serialisers (to JSON), the sweeper (typically to clean-up, for instance a cache)...

Authorizations

Main families in DB (entityname_auth_lookup) and acts_as_authorized

Sub-families in **Translator found in application_controller.rb->find_and_authorize_requested_item

Sharing permissions

Many elements in Seek have Sharing permissions: by Default (i.e. no policy in DB)

  • Policy based (Policy table + Permission). Levels of permission includes the lower levels ( it is not a mask)