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: README.md
+2-14Lines changed: 2 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
14
14
The Attribute-Based Access-Control Library let you define five `can` access ability:
15
15
16
-
- Who can? the answer is `subject` - Like RBAC a user can have multiple roles.
16
+
- Who can? the answer is `subject` - Like RBAC a user can have multiple subjects.
17
17
- How can it? the answer is `action` - You can define `any` actions you want (scoped).
18
18
- What can? the answer is `object` - You can define `all` objects you want (scoped).
19
19
- Where can? the answer is `location` - With IP and CIDR you can find the location of users.
@@ -40,19 +40,7 @@ Definition as a verb is:
40
40
- look at carefully; scan.
41
41
- assess or investigate something.
42
42
43
-
In this library, I have scoped `action` and `object` which means you can have more control over these attributes.
44
-
45
-
Assume you have a publisher website with four types of users with the following roles:
46
-
47
-
-`admin` super user can do anything
48
-
-`manager` can do anything on articles
49
-
-`guest` can read only published article
50
-
-`user` the writers with limitations on time and location of article creation.
51
-
52
-
In microservice design patterns and restful's based on my opinion one of the best practices has focused on resource management, a single endpoint with a concentration on objects is better than having multiple endpoints or having complex business logic.
53
-
54
-
Now, if you want to handle all these policies in one place (e.g. `GET endpoint` read permission) how you can do this?
55
-
we suppose you use the `scoped` policy or `ability` grant definition instead of having multiple endpoints or having complex business logic.
43
+
In this library, I have scoped `action`, `object` and `subject` which means you can have more control over these attributes.
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/7d4c12e/src/classes/acl.class.ts#L16">classes/acl.class.ts:16</a></li></ul></aside></li></ul></section></section>
83
+
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/2b1e4a2/src/classes/acl.class.ts#L16">classes/acl.class.ts:16</a></li></ul></aside></li></ul></section></section>
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/7d4c12e/src/classes/acl.class.ts#L13">classes/acl.class.ts:13</a></li></ul></aside></section>
90
+
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/2b1e4a2/src/classes/acl.class.ts#L13">classes/acl.class.ts:13</a></li></ul></aside></section>
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/7d4c12e/src/classes/acl.class.ts#L14">classes/acl.class.ts:14</a></li></ul></aside></section></section>
95
+
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/2b1e4a2/src/classes/acl.class.ts#L14">classes/acl.class.ts:14</a></li></ul></aside></section></section>
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/7d4c12e/src/classes/acl.class.ts#L25">classes/acl.class.ts:25</a></li></ul></aside></li></ul></section></section>
115
+
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/2b1e4a2/src/classes/acl.class.ts#L25">classes/acl.class.ts:25</a></li></ul></aside></li></ul></section></section>
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/7d4c12e/src/classes/acl.class.ts#L58">classes/acl.class.ts:58</a></li></ul></aside></li></ul></section>
136
+
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/2b1e4a2/src/classes/acl.class.ts#L58">classes/acl.class.ts:58</a></li></ul></aside></li></ul></section>
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/7d4c12e/src/classes/acl.class.ts#L39">classes/acl.class.ts:39</a></li></ul></aside></li></ul></section>
149
+
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/2b1e4a2/src/classes/acl.class.ts#L39">classes/acl.class.ts:39</a></li></ul></aside></li></ul></section>
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/7d4c12e/src/classes/acl.class.ts#L35">classes/acl.class.ts:35</a></li></ul></aside></li></ul></section>
162
+
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/2b1e4a2/src/classes/acl.class.ts#L35">classes/acl.class.ts:35</a></li></ul></aside></li></ul></section>
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/7d4c12e/src/classes/acl.class.ts#L43">classes/acl.class.ts:43</a></li></ul></aside></li></ul></section></section></div>
177
+
<li>Defined in <ahref="https://github.com/vhidvz/abacl/blob/2b1e4a2/src/classes/acl.class.ts#L43">classes/acl.class.ts:43</a></li></ul></aside></li></ul></section></section></div>
0 commit comments