cortezaproject / corteza-docs

Documentation, manual, instructions
https://docs.cortezaproject.org
Apache License 2.0
124 stars 68 forks source link

Fix and update contextual role expression examples #361

Open tjerman opened 1 year ago

tjerman commented 1 year ago

The documented examples for contextual role expression examples are no longer ok; they changed a while back and we never updated the examples.

Refer to the provision files for how they should be https://github.com/cortezaproject/corteza/blob/2022.9.x/server/provision/000_base/roles.yaml#L27

Document to address https://docs.cortezaproject.org/corteza-docs/2022.9/integrator-guide/security-model/examples/examples-contextual.html

In essence the issue is only in the way variables/parameters are defined and accessed. There are only two variables at the moment -- userID and resource where the resource represents one of the things the contextual role is evaluated for