Theory

Rules are used in Deep to manage rights, such as the rights to Insert/Update/Delete/Select/Login. More on this in the chapter Permissions .

The rules answer’s this question: What Action can the Subject do with the Object, where each of them are - Selectors.

Screenshot 2022-02-25 at 08.14.50.png

Prepare

Several of the coming steps duplicate those from Trees. If you did, you can use the links from there.

<TreesPreparationDuplication>

Let's prepare the types for a reproducible example.

Screenshot 2022-02-25 at 15.31.42.png

<aside> ‼️ Attention! IDs may not match, as they are taken from different examples. Be careful with mutations.

</aside>

</TreesPreparationDuplication>

Example

Suppose we need a rule:

<aside> 📍 User X (as Subject) has the rule toВ about A3 and below by Tree1 (as Object).

</aside>

We need to know Rule, RuleSubject, RuleObject and RuleAction IDs.

<aside> ❕ An example of the use of the legal system is discussed in the next chapter Permissions .

</aside>

Untitled

Let's create a user. Formally, this can be any link, but for clarity, let's make a user.