Skip to content

Commit

Permalink
docs: add emojis
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihky committed Feb 9, 2025
1 parent a04302e commit 37b53c6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ https://github.com/user-attachments/assets/c7815622-c1c9-4fbe-986e-6c9f88c8b31d
npm i -S pundit-ts
```

### Access Control Models
### 🔒 Access Control Models

Here some examples to utilize pundit-ts for applying common access control models like RBAC, ABAC etc..

Expand Down Expand Up @@ -149,7 +149,7 @@ class DocumentPolicy {

</details>

### Authorize users
### 🔑 Authorize users

Encapsulate your authorization logic behind your `PunditPolicy` implementations. Reuse those policies when you need. Manage your authorization logic from one place.

Expand All @@ -169,7 +169,7 @@ const post = await prisma.post.findFirst({ where: { id: 123 } });
+ }
```

### Filter entitites
### 🔎 Filter entitites

Pundit-TS is a ORM-agnostic library. You may use your choice of ORM, query builder or anything.

Expand All @@ -178,6 +178,8 @@ Pundit-TS is a ORM-agnostic library. You may use your choice of ORM, query build
+prisma.post.findMany(pundit.filter(context, Post))
```

### ⌨️ Usage

Declare your models.

```typescript
Expand Down

0 comments on commit 37b53c6

Please sign in to comment.