@tc-libs/permission 3.5.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -6
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,11 +1,54 @@
|
|
|
1
|
-
# permission
|
|
1
|
+
# @tc-libs/permission
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Gestione permessi applicativi.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Il package include:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- `PermissionModule`
|
|
8
|
+
- `PermissionService`
|
|
9
|
+
- entity/repository/controller admin
|
|
10
|
+
- DTO e serializzazioni
|
|
11
|
+
- costanti permission-centric
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## `PermissionService`
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Estende `AbstractService` e aggiunge metodi specifici:
|
|
16
|
+
|
|
17
|
+
- `findAllIds()`
|
|
18
|
+
- `findAllByGroup(filterGroups?, options?)`
|
|
19
|
+
- `updateDescription(repository, dto)`
|
|
20
|
+
- `updateGroup(repository, dto)`
|
|
21
|
+
- `active(repository)`
|
|
22
|
+
- `inactive(repository)`
|
|
23
|
+
|
|
24
|
+
Esempio:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
const permissions = await this.permissionService.findAllByGroup({
|
|
28
|
+
group: 'user',
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Ruolo nel monorepo
|
|
33
|
+
|
|
34
|
+
Questo package viene usato direttamente da:
|
|
35
|
+
|
|
36
|
+
- `authentication` per i permission token
|
|
37
|
+
- `role` per associare permessi ai ruoli
|
|
38
|
+
|
|
39
|
+
## Export utili
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import {
|
|
43
|
+
PermissionModule,
|
|
44
|
+
PermissionService,
|
|
45
|
+
PermissionEntity,
|
|
46
|
+
} from '@tc-libs/permission';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Sviluppo
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
nx build permission
|
|
53
|
+
nx test permission
|
|
54
|
+
```
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tc-libs/permission",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@tc-libs/pagination": "3.
|
|
6
|
-
"@tc-libs/authentication": "3.
|
|
7
|
-
"@tc-libs/request": "3.
|
|
8
|
-
"@tc-libs/response": "3.
|
|
9
|
-
"@tc-libs/errors": "3.
|
|
10
|
-
"@tc-libs/doc": "3.
|
|
11
|
-
"@tc-libs/database": "3.
|
|
12
|
-
"@tc-libs/app-cache": "3.
|
|
13
|
-
"@tc-libs/service": "3.
|
|
5
|
+
"@tc-libs/pagination": "3.6.1",
|
|
6
|
+
"@tc-libs/authentication": "3.6.1",
|
|
7
|
+
"@tc-libs/request": "3.6.1",
|
|
8
|
+
"@tc-libs/response": "3.6.1",
|
|
9
|
+
"@tc-libs/errors": "3.6.1",
|
|
10
|
+
"@tc-libs/doc": "3.6.1",
|
|
11
|
+
"@tc-libs/database": "3.6.1",
|
|
12
|
+
"@tc-libs/app-cache": "3.6.1",
|
|
13
|
+
"@tc-libs/service": "3.6.1",
|
|
14
14
|
"@faker-js/faker": "^9.6.0",
|
|
15
15
|
"@nestjs/common": "^11.0.12",
|
|
16
16
|
"@nestjs/swagger": "^11.1.0",
|