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:
@@ -17,7 +17,6 @@ import "./comment";
|
||||
import "./document";
|
||||
import "./fileOperation";
|
||||
import "./integration";
|
||||
import "./notificationSetting";
|
||||
import "./pins";
|
||||
import "./searchQuery";
|
||||
import "./share";
|
||||
|
||||
@@ -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
|
||||
);
|
||||
Reference in New Issue
Block a user