diff --git a/src/lib/common/classes.ts b/src/lib/common/classes.ts index 22a7f00..5384a6e 100644 --- a/src/lib/common/classes.ts +++ b/src/lib/common/classes.ts @@ -14,6 +14,14 @@ export class Device { } } +export class ACL { + public groups: {[key: string]: string} = {} + + public constructor(init?: Partial) { + Object.assign(this, init); + } +} + export class Route { advertisedRoutes: string[] = []; enabledRoutes: string[] = []; diff --git a/src/lib/common/stores.js b/src/lib/common/stores.js index 0873d52..b3502a1 100644 --- a/src/lib/common/stores.js +++ b/src/lib/common/stores.js @@ -1,5 +1,5 @@ import { writable } from 'svelte/store'; -import { Device, User } from '$lib/common/classes'; +import { Device, User, ACL } from '$lib/common/classes'; // used to store the value of an alert across all components export const alertStore = writable(''); @@ -24,4 +24,6 @@ export const deviceSearchStore = writable(''); export const deviceSortStore = writable('id'); export const deviceSortDirectionStore = writable('ascending'); export const userSortStore = writable('id'); -export const sortDirectionStore = writable('ascending'); \ No newline at end of file +export const sortDirectionStore = writable('ascending'); +// stores ACL object +export const aclStore = writable(new ACL()); \ No newline at end of file