- Externalize all @tamagui/* and tamagui subpaths so dist no longer vendors Tamagui. - Emit TypeScript declarations with vite-plugin-dts; fix package exports types for ui/*. - Align initEnv with profiles: displayName, brandLogo, api.baseURL, themeColor, uiShell. - Stabilize tests with Node localStorage file; env tests pass. - Update README and component docs for services, menus, API client, and development.
15 lines
522 B
JavaScript
15 lines
522 B
JavaScript
import { normalizeRightsInput } from './rights.js';
|
|
|
|
export class Permit {
|
|
constructor(data = {}) {
|
|
this.id = data.id || null;
|
|
this.principal_type = data.principal_type || 'role';
|
|
this.principal_id = data.principal_id || '';
|
|
this.resource_path = data.resource_path || '*';
|
|
this.rights = normalizeRightsInput(data.rights || 0);
|
|
this.effect = data.effect || 'allow';
|
|
this.created_on = data.created_on || new Date().toISOString();
|
|
this.updated_on = data.updated_on || this.created_on;
|
|
}
|
|
}
|