runbot/runbot_test/security/ir.model.access.csv
William Braeckman b51909fab6 [IMP] runbot: implement public api mixin
Until now api routes on runbot have been created through custom website
pages in production.
We want to unify the API by making a 'public' api, inspired by the way
`web_search_read` works.

This commit adds:
 - A route to list all publicly available models
 - A route to do a read on a public model
 - A route to fetch the publicly available specification for a model
 - A public model mixin that provides all the tools required to support
   the above mentionned routes.

The mixin adds the ability to add the `public` attribute on fields.
Any field marked as public can then be publicly queried through the
controller.
Relational fields work in a nested manner (`fields` key in the field's
sub-specification) (up to a depth of 10).
The public api does not allow going through a relationship back and
front (parent->child->parent is NOT allowed).

Because we are based on `web_search_read`, we heavily focus on
validating the specification, for security reasons, and offset the load
of reading to the `web_read` function (we currently don't provide limit
metadata).
2025-03-17 13:44:35 +01:00

1.0 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2runbot_test.access_runbot_test_model_parentaccess_runbot_test_model_parentrunbot_test.model_runbot_test_model_parentbase.group_user1000
3runbot_test.access_runbot_test_model_childaccess_runbot_test_model_childrunbot_test.model_runbot_test_model_childbase.group_user1000
4runbot_test.access_runbot_test_model_child_privateaccess_runbot_test_model_child_privaterunbot_test.model_runbot_test_model_child_privatebase.group_user1000
5runbot_test.access_runbot_test_model_parent_adminaccess_runbot_test_model_parent_adminrunbot_test.model_runbot_test_model_parentrunbot.group_runbot_admin1111
6runbot_test.access_runbot_test_model_child_adminaccess_runbot_test_model_child_adminrunbot_test.model_runbot_test_model_childrunbot.group_runbot_admin1111
7runbot_test.access_runbot_test_model_child_admin_privateaccess_runbot_test_model_child_admin_privaterunbot_test.model_runbot_test_model_child_privaterunbot.group_runbot_admin1111