Remove NotificationSettings table (#5036

* helper

* Add script to move notification settings

* wip, removal of NotificationSettings

* event name

* iteration

* test

* test

* Remove last of NotificationSettings model

* refactor

* More fixes

* snapshots

* Change emails to class instances for type safety

* test

* docs

* Update migration for self-hosted

* tsc
This commit is contained in:
Tom Moor
2023-03-18 09:32:41 -04:00
committed by GitHub
parent 41f97b0563
commit 45831e9469
58 changed files with 972 additions and 711 deletions

View File

@@ -17,7 +17,6 @@ import "./comment";
import "./document";
import "./fileOperation";
import "./integration";
import "./notificationSetting";
import "./pins";
import "./searchQuery";
import "./share";

View File

@@ -1,16 +0,0 @@
import { NotificationSetting, Team, User } from "@server/models";
import { allow } from "./cancan";
allow(User, "createNotificationSetting", Team, (user, team) => {
if (!team || user.teamId !== team.id) {
return false;
}
return true;
});
allow(
User,
["read", "update", "delete"],
NotificationSetting,
(user, setting) => user && user.id === setting?.userId
);