@things-factory/lite-menu 6.4.1 → 6.4.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/lite-menu",
3
- "version": "6.4.1",
3
+ "version": "6.4.3",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -37,13 +37,13 @@
37
37
  "@operato/shell": "^1.0.1",
38
38
  "@operato/styles": "^1.0.0",
39
39
  "@operato/utils": "^1.0.1",
40
- "@things-factory/apptool-base": "^6.4.1",
41
- "@things-factory/auth-base": "^6.4.1",
42
- "@things-factory/board-service": "^6.4.1",
43
- "@things-factory/board-ui": "^6.4.1",
44
- "@things-factory/more-base": "^6.4.1",
45
- "@things-factory/setting-base": "^6.4.1",
40
+ "@things-factory/apptool-base": "^6.4.2",
41
+ "@things-factory/auth-base": "^6.4.2",
42
+ "@things-factory/board-service": "^6.4.2",
43
+ "@things-factory/board-ui": "^6.4.2",
44
+ "@things-factory/more-base": "^6.4.2",
45
+ "@things-factory/setting-base": "^6.4.2",
46
46
  "@things-factory/utils": "^6.3.1"
47
47
  },
48
- "gitHead": "47ea4ab312b1d23a146e4d2048972b39af6592fa"
48
+ "gitHead": "c58bbe470fad9138a554c050292681fd922173c7"
49
49
  }
@@ -2,7 +2,7 @@ import { In } from 'typeorm'
2
2
  import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'
3
3
 
4
4
  import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
5
- import { PrivilegeObject, User, checkPermission } from '@things-factory/auth-base'
5
+ import { User, checkPermission } from '@things-factory/auth-base'
6
6
  import { Board } from '@things-factory/board-service'
7
7
 
8
8
  import { LiteMenu } from './lite-menu'
@@ -40,7 +40,7 @@ export class LiteMenuQuery {
40
40
 
41
41
  @Query(returns => LiteMenuList, { description: 'To fetch my own LiteMenus' })
42
42
  async myLiteMenus(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<LiteMenuList> {
43
- const { domain, user, unsafeIP, prohibitedPrivileges } = context.state
43
+ const { domain } = context.state
44
44
 
45
45
  const queryBuilder = getQueryBuilderFromListParams({
46
46
  repository: getRepository(LiteMenu),
@@ -52,12 +52,6 @@ export class LiteMenuQuery {
52
52
 
53
53
  const filtered = []
54
54
 
55
- for (let item of items) {
56
- if (await checkPermission(item.privilege, user, domain, unsafeIP, prohibitedPrivileges)) {
57
- filtered.push(item)
58
- }
59
- }
60
-
61
55
  return { items: filtered, total: filtered.length }
62
56
  }
63
57
 
@@ -1,5 +1,4 @@
1
1
  import { Field, InputType, Int, ObjectType } from 'type-graphql'
2
- import { PrivilegeInput } from '@things-factory/auth-base'
3
2
 
4
3
  import { LiteMenu } from './lite-menu'
5
4
 
@@ -31,9 +30,6 @@ export class NewLiteMenu {
31
30
 
32
31
  @Field({ nullable: true })
33
32
  active?: boolean
34
-
35
- @Field({ nullable: true })
36
- privilege?: PrivilegeInput
37
33
  }
38
34
 
39
35
  @InputType()
@@ -64,9 +60,6 @@ export class LiteMenuPatch {
64
60
 
65
61
  @Field({ nullable: true })
66
62
  active?: boolean
67
-
68
- @Field({ nullable: true })
69
- privilege?: PrivilegeInput
70
63
  }
71
64
 
72
65
  @ObjectType()
@@ -1,16 +1,7 @@
1
1
  import { Field, ID, Int, ObjectType } from 'type-graphql'
2
- import {
3
- Column,
4
- CreateDateColumn,
5
- Entity,
6
- Index,
7
- ManyToOne,
8
- PrimaryGeneratedColumn,
9
- RelationId,
10
- UpdateDateColumn
11
- } from 'typeorm'
12
-
13
- import { PrivilegeObject, User } from '@things-factory/auth-base'
2
+ import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
3
+
4
+ import { User } from '@things-factory/auth-base'
14
5
  import { Board } from '@things-factory/board-service'
15
6
  import { Domain } from '@things-factory/shell'
16
7
 
@@ -89,10 +80,6 @@ export class LiteMenu {
89
80
  @Field(type => Board, { nullable: true })
90
81
  board?: Board
91
82
 
92
- @Column({ type: 'simple-json', nullable: true })
93
- @Field(type => PrivilegeObject, { nullable: true })
94
- privilege?: PrivilegeObject
95
-
96
83
  @CreateDateColumn()
97
84
  @Field({ nullable: true })
98
85
  createdAt?: Date