@molochko-dev/data 1.4.16 → 1.4.17

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.
@@ -1,2 +1,3 @@
1
1
  import { IRolePermissionItem } from './types';
2
+ export declare const ROOT_PERMISSIONS: IRolePermissionItem[];
2
3
  export declare const USER_PERMISSIONS: IRolePermissionItem[];
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.USER_PERMISSIONS = void 0;
3
+ exports.USER_PERMISSIONS = exports.ROOT_PERMISSIONS = void 0;
4
4
  const enums_1 = require("./enums");
5
+ exports.ROOT_PERMISSIONS = [
6
+ {
7
+ name: "*",
8
+ },
9
+ ];
5
10
  exports.USER_PERMISSIONS = [
6
11
  {
7
12
  name: "org",
package/dist/types.d.ts CHANGED
@@ -15,8 +15,8 @@ export interface IBackendRolePermissionItem {
15
15
  }
16
16
  export interface IRolePermissionItem {
17
17
  name: string;
18
- frontend: {
18
+ frontend?: {
19
19
  path: string;
20
20
  };
21
- backend: IBackendRolePermissionItem[];
21
+ backend?: IBackendRolePermissionItem[];
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molochko-dev/data",
3
- "version": "1.4.16",
3
+ "version": "1.4.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "typings/index.d.ts",
@@ -1,6 +1,11 @@
1
1
  import { SYSTEM_USER_ROLES_ENUM, USER_PERMISSION_ENUM, USER_PERMISSION_METHOD_ENUM } from './enums'
2
2
  import { IRolePermissionItem } from './types'
3
3
 
4
+ export const ROOT_PERMISSIONS: IRolePermissionItem[] = [
5
+ {
6
+ name: "*",
7
+ },
8
+ ]
4
9
  export const USER_PERMISSIONS: IRolePermissionItem[] = [
5
10
  {
6
11
  name: "org",
package/src/types.ts CHANGED
@@ -17,9 +17,9 @@ export interface IBackendRolePermissionItem {
17
17
 
18
18
  export interface IRolePermissionItem {
19
19
  name: string,
20
- frontend: {
20
+ frontend?: {
21
21
  path: string
22
22
  }
23
- backend: IBackendRolePermissionItem[]
23
+ backend?: IBackendRolePermissionItem[]
24
24
  }
25
25