You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/content/interacting/managing-group-access.mdx
+21-22
Original file line number
Diff line number
Diff line change
@@ -21,32 +21,31 @@ import {
21
21
22
22
<DocumentationNotice />
23
23
24
-
In this guide you will learn how to grant a group of users access to a particular object.
24
+
<ProductNameformat={ProductNameFormat.ShortForm}/> allows you to grant a group of users access to a particular object.
25
25
26
26
<CardBoxtitle="When to use"appearance="filled">
27
27
28
-
Adding a relationship tuple specifying that a group has a relation to an object is helpful in cases where you want to encompass a set of users with the same relation to an object. For example:
28
+
Relationship tuples are helpful when you want to specify that a group of users all have the same relation to an object. For example, <ProductNameformat={ProductNameFormat.ShortForm}/> allows you to:
29
29
30
30
- Grant a group of `engineers``viewer` access to `roadmap.doc`
31
31
- Create a `block_list` of `members` who can't access a `document`
32
-
-Sharing a `document` with a `team`
33
-
-Granting`viewer` access to a `photo` to `followers` only
34
-
-Making a `file` viewable for all `users` within an `organization`
35
-
-Restricting access from or to`users` in a certain `locale`
32
+
-Share a `document` with a `team`
33
+
-Grant`viewer` access to a `photo` to `followers` only
34
+
-Make a `file` viewable for all `users` within an `organization`
35
+
-Manage access to a `database` for`users` in a certain `locale`
36
36
37
37
</CardBox>
38
38
39
-
## Before You Start
39
+
## Before you start
40
40
41
-
In order to understand this guide correctly you must be familiar with some <ProductConcept /> and know how to develop the things that we will list below.
41
+
Familiarize yourself with basic <ProductConcept /> before you continue.
42
42
43
43
<details>
44
44
<summary>
45
45
46
-
Assume that you have the following <ProductConceptsection="what-is-an-authorization-model"linkName="authorization model" />.<br />
47
-
You have two <ProductConceptsection="what-is-a-type"linkName="types" />:
46
+
In the example below, you have the following <ProductConceptsection="what-is-an-authorization-model"linkName="authorization model" /> with two <ProductConceptsection="what-is-a-type"linkName="types" />:
48
47
49
-
-`company` that can have a`employee` relation
48
+
-`company` that can have an`employee` relation
50
49
-`document` that can have a `reader` relation.
51
50
52
51
</summary>
@@ -90,27 +89,27 @@ You have two <ProductConcept section="what-is-a-type" linkName="types" />:
90
89
91
90
<hr />
92
91
93
-
In addition, you will need to know the following:
92
+
In addition, the following concepts are important to group access management:
94
93
95
-
### Modeling User Groups
94
+
### Modeling user groups
96
95
97
-
You need to know how to add users to groups and grant groups access to an object. [Learn more →](../modeling/user-groups.mdx)
96
+
<ProductNameformat={ProductNameFormat.ShortForm}/> allows you to add users to groups and grant groups access to an object. [For more information, see User Groups.](../modeling/user-groups.mdx)
- A <ProductConceptsection="what-is-a-type"linkName="Type" />: a class of objects that have similar characteristics
102
101
- A <ProductConceptsection="what-is-a-user"linkName="User" />: an entity in the system that can be related to an object
103
-
- A <ProductConceptsection="what-is-a-relation"linkName="Relation" />: is a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system
102
+
- A <ProductConceptsection="what-is-a-relation"linkName="Relation" />: a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system
104
103
- An <ProductConceptsection="what-is-an-object"linkName="Object" />: represents an entity in the system. Users' relationships to it can be define through relationship tuples and the authorization model
105
104
- A <ProductConceptsection="what-is-a-relationship-tuple"linkName="Relationship Tuple" />: a grouping consisting of a user, a relation and an object stored in <ProductNameformat={ProductNameFormat.ShortForm}/>
106
105
107
106
</details>
108
107
109
-
## Step By Step
108
+
## Step by step
110
109
111
110
### 01. Adding Company To The Document
112
111
113
-
If we want to have every `employee` of a type `company`have a `reader` relationship with a particular object of type `document` (in this case `document:planning`), we need to add a tuple like so:
112
+
The following <ProductConceptsection="what-is-a-relationship-tuple"linkName="Relationship Tuple" /> assigns ever `employee` of a type `company` a `reader` relationship with a particular object of type `document`, in this case `document:planning`):
114
113
115
114
<RelationshipTuplesViewer
116
115
relationshipTuples={[
@@ -123,9 +122,9 @@ If we want to have every `employee` of a type `company` have a `reader` relation
123
122
]}
124
123
/>
125
124
126
-
### 02. Adding Employee To The Company
125
+
### 02. Add an employee to the company
127
126
128
-
If we also write a tuple that says that Anne is a`employee` of `company:xyz`, like so:
127
+
Below is a <ProductConceptsection="what-is-a-relationship-tuple"linkName="relationship tuple" /> specifying that `Anne` is an`employee` of `company:xyz`:
129
128
130
129
<WriteRequestViewer
131
130
relationshipTuples={[
@@ -137,13 +136,13 @@ If we also write a tuple that says that Anne is a `employee` of `company:xyz`, l
137
136
]}
138
137
/>
139
138
140
-
### 03. Checking An Individual Member's Access To An Object
139
+
### 03. Checking an individual member's access to an object
141
140
142
-
Then a call to the Check API to see whether Anne can read `document:planning`will return true:
141
+
Call the Check API to verify that Anne can read `document:planning`returns true:
Copy file name to clipboardexpand all lines: docs/content/interacting/transactional-writes.mdx
+20-22
Original file line number
Diff line number
Diff line change
@@ -21,24 +21,22 @@ import {
21
21
22
22
<DocumentationNotice />
23
23
24
-
In this guide you will learn how to update multiple <ProductConceptsection="what-is-a-relationship-tuple"linkName="relationship tuples" /> in a single transaction.
24
+
Using<ProductNameformat={ProductNameFormat.ShortForm}/>, you can update multiple <ProductConceptsection="what-is-a-relationship-tuple"linkName="relationship tuples" /> in a single transaction.
25
25
26
26
<CardBoxtitle="When to use"appearance="filled">
27
27
28
-
Updating multiple relationship tuples is useful to keep system state consistent.
28
+
Updating multiple relationship tuples can keep your system state consistent.
29
29
30
30
</CardBox>
31
31
32
32
## Before You Start
33
33
34
-
In order to understand this guide correctly you must be familiar with some <ProductConcept /> and know how to develop the things that we will list below.
34
+
Familiarize yourself with basic <ProductConcept /> before completing this guide.
35
35
36
36
<details>
37
37
<summary>
38
38
39
-
Assume that you have the following <ProductConceptsection="what-is-an-authorization-model"linkName="authorization model" />.<br />
40
-
You have a <ProductConceptsection="what-is-a-type"linkName="type" /> called `tweet` that can have a `reader`.
41
-
You have another type called `user` that can have a `follower` and `followed_by` relationship.
39
+
In the following <ProductConceptsection="what-is-an-authorization-model"linkName="authorization model" />, there is <ProductConceptsection="what-is-a-type"linkName="type" /> called `tweet` that can have a `reader`. There is another type called `user` that can have a `follower` and `followed_by` relationship.
42
40
43
41
</summary>
44
42
@@ -88,31 +86,31 @@ You have another type called `user` that can have a `follower` and `followed_by`
88
86
89
87
<hr />
90
88
91
-
In addition, you will need to know the following:
89
+
In addition:
92
90
93
-
### Direct Access
91
+
### Direct access
94
92
95
-
You need to know how to create an authorization model and create a relationship tuple to grant a user access to an object. [Learn more →](../modeling/direct-access.mdx)
93
+
Creating an authorization model and a relationship tuple grants a user access to an object. To learn more, [read about Direct Access.](../modeling/direct-access.mdx)
96
94
97
-
### Modeling Public Access
95
+
### Modeling public access
98
96
99
-
You need to know how to grant public access to an object. [Learn more →](../modeling/public-access.mdx)
97
+
The following example uses public access. To learn more, [read about Public Access.](../modeling/direct-access.mdx)
- A <ProductConceptsection="what-is-a-type"linkName="Type" />: a class of objects that have similar characteristics
104
102
- A <ProductConceptsection="what-is-a-user"linkName="User" />: an entity in the system that can be related to an object
105
103
- A <ProductConceptsection="what-is-a-relation"linkName="Relation" />: is a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system
106
-
-An <ProductConceptsection="what-is-an-object"linkName="Object" />: represents an entity in the system. Users' relationships to it can be define through relationship tuples and the authorization model
107
-
- A <ProductConceptsection="what-is-a-relationship-tuple"linkName="Relationship Tuple" />: a grouping consisting of a user, a relation and an object stored in <ProductNameformat={ProductNameFormat.ShortForm}/>
104
+
-A <ProductConceptsection="what-is-a-relation"linkName="Relation" />: a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system
105
+
- A <ProductConceptsection="what-is-a-relationship-tuple"linkName="Relationship Tuple" />: a group stored in <ProductNameformat={ProductNameFormat.ShortForm}/> that consists of a user, a relation, and an object
108
106
109
107
</details>
110
108
111
-
## Step By Step
109
+
## Step by step
112
110
113
-
### 01. Adding And Removing Relationship Tuples In The Same Transaction
111
+
### 01. Add and remove relationship tuples in the same transaction
114
112
115
-
When you need to add or delete tuples in your store, you can do so by calling the Write API. For example, if you want to make `tweet:1` public by making everyone a `viewer`, you write one tuple:
113
+
A call to the Write API can add or delete tuples in your store. For example, the following tuple makes `tweet:1` public by making everyone a `viewer`:
116
114
117
115
<WriteRequestViewer
118
116
relationshipTuples={[
@@ -124,7 +122,7 @@ When you need to add or delete tuples in your store, you can do so by calling th
124
122
]}
125
123
/>
126
124
127
-
And if you want to convert this `tweet` to private, you would need to delete that tuple:
125
+
Deleting the previous tuple converts this `tweet` to private:
128
126
129
127
<WriteRequestViewer
130
128
deleteRelationshipTuples={[
@@ -168,9 +166,9 @@ The Write API allows you to send up to 100 unique tuples in the request. (This l
168
166
]}
169
167
/>
170
168
171
-
### 02. Adding Multiple Related Relationship Tuples In The Same Transaction
169
+
### 02. Add multiple related relationship tuples in the same transaction
172
170
173
-
Having the ability to send multiple tuples per request is also useful when you want to maintain consistency. For example, if `anne`starts following `becky`, we want to be able to save the following two tuples, or neither of them:
171
+
Sending multiple tuples per request can also help maintain consistency. For example, if `anne`follows `becky`, you can save the following two tuples or neither of them:
174
172
175
173
<RelationshipTuplesViewer
176
174
relationshipTuples={[
@@ -190,10 +188,10 @@ Having the ability to send multiple tuples per request is also useful when you w
190
188
/>
191
189
192
190
:::info
193
-
We have a type called user in this case because users can be related to each other, so the users now are a type in the system
191
+
In this case, the type `user` exists because users can be related to each other, so users now are a type in the system.
194
192
:::
195
193
196
-
The <ProductNameformat={ProductNameFormat.LongForm}/> service will attempt to perform all the changes sent in a single Write API call in one transaction. If it can't (for example, if any of the requested changes fails), it will reject all of the changes.
194
+
The <ProductNameformat={ProductNameFormat.LongForm}/> service attempts to perform all the changes sent in a single Write API call in one transaction. If it cannot complete all the changes, it rejects all of them.
0 commit comments