Skip to content

Commit 099afbe

Browse files
committed
moving this back to the original text so that it won't conflict with PR 2708, which also includes typo fixes
1 parent fe055c2 commit 099afbe

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

docs/getting-started/modeling.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Permify has its own language that you can model your authorization logic with it
1313

1414
![modeling-authorization](https://raw.githubusercontent.com/Permify/permify/master/assets/permify-dsl.gif)
1515

16-
You can define your entities, relations between them, and access control decisions using Permify Schema. It includes set-algebraic operators such as intersection and union for specifying potentially complex access control policies in terms of those user-object relations.
16+
You can define your entities, relations between them and access control decisions with using Permify Schema. It includes set-algebraic operators such as intersection and union for specifying potentially complex access control policies in terms of those user-object relations.
1717

1818
Here’s a simple breakdown of our schema.
1919

@@ -27,7 +27,7 @@ This guide will show how to develop a Permify Schema from scratch with a simple
2727

2828
We'll follow a simplified version of the GitHub access control system, where teams and organizations have control over the viewing, editing, or deleting access rights of repositories.
2929

30-
Before starting I want to share the full implementation of a simple GitHub access control example using Permify Schema.
30+
Before start I want to share the full implementation of simple Github access control example with using Permify Schema.
3131

3232
<iframe
3333
src="https://play.permify.co/?s=s-d1Qkf1d4y6RsxkugbIDYhxdYxfNRlm&t=f"
@@ -66,16 +66,16 @@ entity team {}
6666
entity repository {}
6767
```
6868

69-
Entities have 2 different attributes. These are;
69+
Entities has 2 different attributes. These are;
7070

7171
- **relations**
7272
- **actions or permissions**
7373

7474
## Defining Relations
7575

76-
Relations represent relationships between entities. It's probably the most critical part of the schema because Permify is mostly based on relations between resources and their permissions.
76+
Relations represent relationships between entities. It's probably the most critical part of the schema because Permify mostly based on relations between resources and their permissions.
7777

78-
The keyword **_relation_** needs to be used to create an entity relation with name and type attributes.
78+
Keyword **_relation_** need to used to create a entity relation with name and type attributes.
7979

8080
**Relation Attributes:**
8181

@@ -88,11 +88,11 @@ An example relation takes form of,
8888
relation [name] @[type]
8989
```
9090

91-
Let's turn back to our example and define our relations inside our entities:
91+
Lets turn back to our example and define our relations inside our entities:
9292

9393
### User Entity
9494

95-
→ The user entity is a mandatory entity in Permify. It generally will be empty but it will be used a lot in other entities as a relation type for referencing users.
95+
→ The user entity is a mandatory entity in Permify. It generally will be empty but it will used a lot in other entities as a relation type to referencing users.
9696

9797
```perm
9898
entity user {}
@@ -137,7 +137,7 @@ The parent relation is indicating the organization the team belongs to. This way
137137

138138
### Ownership
139139

140-
In GitHub workflow, organizations and users can have multiple repositories, so each repository is related to an organization and to users. We can define repository relations as follows.
140+
In Github workflow, organizations and users can have multiple repositories, so each repository is related with an organization and with users. We can define repository relations as as follows.
141141

142142
```perm
143143
entity repository {
@@ -160,12 +160,12 @@ As you can see we have new syntax above,
160160
relation maintainer @user @team#member
161161
```
162162

163-
When we look at the maintainer relation, it indicates that the maintainer can be a `user` as well as this user can be a `team member`.
163+
When we look at the maintainer relation, it indicates that the maintainer can be an `user` as well as this user can be a `team member`.
164164

165165
<Note>
166166
You can use **#** to reach entities relation. When we look at the `@team#member` it specifies that if the user has a relation with the team, this relation can only be the `member`. We called that feature locking, because it basically locks the relation type according to the prefixed entity.
167167

168-
The actual purpose of feature locking is to give the ability to specify the sets of users that can be assigned.
168+
Actual purpose of feature locking is to giving ability to specify the sets of users that can be assigned.
169169

170170
For example:
171171

@@ -198,7 +198,7 @@ You can think of these definitions as a precaution taken against creating undesi
198198

199199
</Note>
200200

201-
Defining multiple relation types is totally optional. The goal behind it is to improve validation and reasonability. And for complex models, it allows you to model your entities in a more structured way.
201+
Defining multiple relation types totally optional. The goal behind it to improve validation and reasonability. And for complex models, it allows you to model your entities in a more structured way.
202202

203203
## Defining Permissions
204204

@@ -212,7 +212,7 @@ The Permify Schema supports **`and`**, **`or`** and **`not`** operators to achie
212212

213213
#### Intersection
214214

215-
Let's get back to our GitHub example and create a read action on the repository entity to represent usage of **`and`** &, **`or`** operators,
215+
Lets get back to our github example and create a read action on repository entity to represent usage of **`and`** &, **`or`** operators,
216216

217217
```perm
218218
entity repository {
@@ -240,7 +240,7 @@ The same `read` can also be defined using the **permission** keyword, as follows
240240
permission read = org.admin and (owner or maintainer or org.member)
241241
```
242242

243-
Using `action` and `permission` will yield the same result for defining permissions in your authorization logic. See why we have 2 keywords for defining a permission from the [Nested Hierarchies](#nested-hierarchies) section.
243+
Using `action` and `permission` will yield the same result for defining permissions in your authorization logic. See why we have 2 keywords for defining an permission from the [Nested Hierarchies](#nested-hierarchies) section.
244244

245245
</Note>
246246

@@ -357,7 +357,7 @@ double[]
357357

358358
### Defining Rules
359359

360-
Rules are structures that allow you to write specific conditions for the model. You can think of rules as simple functions that every software language has. They accept parameters and based on a condition, return a true/false result.
360+
Rules are structures that allow you to write specific conditions for the model. You can think rules as simple functions of every software language have. They accept parameters and are based on condition to return a true/false result.
361361

362362
In the following example schema, a rule could be used to check if a given IP address falls within a specified IP range:
363363

@@ -418,7 +418,7 @@ entity repository {
418418
}
419419
```
420420

421-
As shown in the example, we used this rule in the `edit` permission of the repository to check whether the organization:X has edit access or not, depending on the authority level it possesses.
421+
As shown in the example, we used this rule in the `edit` permission of the repository to check whether the organization:X has edit access or not, depending on the authority level it possess.
422422

423423
<Note>
424424
We design our schema language based on [Common Expression Language (CEL)](https://github.com/google/cel-go). So the syntax looks nearly identical to equivalent expressions in C++, Go, Java, and TypeScript.
@@ -459,7 +459,7 @@ Here is what each example focuses on,
459459
- [Google Docs]: how users can gain direct access to a document through **organizational roles** or through **inherited/nested permissions**.
460460
- [Facebook Groups]: how users can perform various actions based on the **roles and permissions within the groups** they belong.
461461
- [Notion]: how **one global entity (workspace) can manage access rights** in the child entities that belong to it.
462-
- [Instagram]: how **public/private attributes** play a role in granting access to specific users.
462+
- [Instagram]: how **public/private attributes** play role in granting access to specific users.
463463
- [Mercury]: how **attributes and rules interact within the hierarchical relationships**.
464464

465465
[Google Docs]: ./examples/google-docs

0 commit comments

Comments
 (0)