UserPermission and GroupPermission models (#5860)
* fix: rename to group_permissions * fix: delete null collectionId records before setting non null constraint * fix: use scope with collectionId not null * fix: update model with documentId * fix: rename to GroupPermission * fix: rename collection_users to user_permissions * fix: teamPermanentDeleter test * fix: use scope with collectionId not null * fix: update model with documentId * fix: rename to UserPermission * fix: create views upon table rename for zero downtime * fix: remove comments
This commit is contained in:
@@ -41,10 +41,10 @@ import ApiKey from "./ApiKey";
|
||||
import Attachment from "./Attachment";
|
||||
import AuthenticationProvider from "./AuthenticationProvider";
|
||||
import Collection from "./Collection";
|
||||
import CollectionUser from "./CollectionUser";
|
||||
import Star from "./Star";
|
||||
import Team from "./Team";
|
||||
import UserAuthentication from "./UserAuthentication";
|
||||
import UserPermission from "./UserPermission";
|
||||
import ParanoidModel from "./base/ParanoidModel";
|
||||
import Encrypted, {
|
||||
setEncryptedColumn,
|
||||
@@ -545,7 +545,7 @@ class User extends ParanoidModel {
|
||||
},
|
||||
options
|
||||
);
|
||||
await CollectionUser.update(
|
||||
await UserPermission.update(
|
||||
{
|
||||
permission: CollectionPermission.Read,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user