This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/app/stores/PoliciesStore.js
Tom Moor e2b28dfeb7 refactor: Policies Architecture (#1016)
* add policy serialize method

* Add policies to collection responses

* wip

* test: remove .only

* refactor: Return policies with team and document requests

* store policies on the client

* refactor: drive admin UI from policies
2019-08-21 21:41:37 -07:00

18 lines
380 B
JavaScript

// @flow
import BaseStore from './BaseStore';
import RootStore from './RootStore';
import Policy from 'models/Policy';
export default class PoliciesStore extends BaseStore<Policy> {
actions = [];
constructor(rootStore: RootStore) {
super(rootStore, Policy);
}
abilties(id: string) {
const policy = this.get(id);
return policy ? policy.abilities : {};
}
}