mirror of
https://github.com/outline/outline.git
synced 2025-12-21 10:39:41 -06:00
10 lines
252 B
TypeScript
10 lines
252 B
TypeScript
import { Notification, User } from "@server/models";
|
|
import { allow } from "./cancan";
|
|
|
|
allow(User, ["read", "update"], Notification, (user, notification) => {
|
|
if (!notification) {
|
|
return false;
|
|
}
|
|
return user?.id === notification.userId;
|
|
});
|