Skip to content

Commit

Permalink
feat(type): user permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD authored and njfamirm committed May 18, 2023
1 parent d8523ec commit 6bb0aac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/type/src/customer-order-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ export interface OrderShippingInfo extends StringifyableRecord {
timePeriod: (typeof timePeriodCS)[number];
}

export const userPermissionsCS = ['*', 'user/patch'] as const;
export const userPermissionsCS = ['user/patch', 'price/patch', 'product/patch'] as const;
export type UserPermission = typeof userPermissionsCS[number];

export interface ComUser extends User {
permissions?: Array<UserPermission>;
permissions?: Array<UserPermission> | 'root';
shopName?: string;
}

Expand Down
2 changes: 1 addition & 1 deletion core/type/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface User extends AlwatrDocumentObject {
/**
* User authorization permissions list.
*/
permissions?: Array<string>;
permissions?: Array<string> | 'root';

fullName: string;

Expand Down

0 comments on commit 6bb0aac

Please sign in to comment.