Skip to content

Instantly share code, notes, and snippets.

@coryhouse
Last active July 6, 2023 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coryhouse/ec40295d0112d85b19a6cca3da1646cf to your computer and use it in GitHub Desktop.
Save coryhouse/ec40295d0112d85b19a6cca3da1646cf to your computer and use it in GitHub Desktop.
Permission response
/** Return this when the user signs in */
type GetUserPermissionsResponse = {
featurePermissions: FeaturePermission[];
projectPermissions: ProjectPermission[];
};
type FeaturePermission = {
subModuleId: number;
permissions: Permission[];
};
type ProjectPermission = {
projectId: number;
projectPermissions: FeaturePermission[];
};
type Permission = "add" | "view" | "edit" | "delete";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment