dashpresshq/dashpress

View on GitHub
src/shared/types/user.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
export enum SystemRoles {
  Creator = "creator",
  Viewer = "viewer",
}

export interface IAccountUser {
  name: string;
  username: string;
  password: string;
  role: string;
}

export type IAccountProfile = Omit<IAccountUser, "password">;

export interface IAuthenticatedUserBag extends IAccountProfile {
  permissions: string[];
}

export enum GranularEntityPermissions {
  Show = "show",
  Create = "create",
  Update = "update",
  Delete = "delete",
}