Files
outline/server/policies/notificationSetting.js
Tom Moor 449dc55aaa chore: Upgrade Babel, Jest, Eslint (#1437)
* chore: Upgrade Prettier 1.8 -> 2.0

* chore: Upgrade Babel 6 -> 7

* chore: Upgrade eslint plugins

* chore: Add eslint import/order rules

* chore: Update flow-typed deps
2020-08-08 22:53:59 -07:00

15 lines
297 B
JavaScript

// @flow
import { NotificationSetting, User } from "../models";
import policy from "./policy";
const { allow } = policy;
allow(User, "create", NotificationSetting);
allow(
User,
["read", "update", "delete"],
NotificationSetting,
(user, setting) => user && user.id === setting.userId
);