EZQMS-729: Restrict spaces operations (#5500)

This commit is contained in:
Alexey Zinoviev
2024-05-04 20:49:24 +07:00
committed by GitHub
parent ad59463057
commit 4bc1534ee0
57 changed files with 873 additions and 114 deletions
+11 -1
View File
@@ -13,13 +13,14 @@
// limitations under the License.
//
import core from '@hcengineering/core'
import core, { AccountRole } from '@hcengineering/core'
import { type Builder } from '@hcengineering/model'
import tracker from '@hcengineering/model-tracker'
import notification from '@hcengineering/notification'
import serverCore from '@hcengineering/server-core'
import serverNotification from '@hcengineering/server-notification'
import serverTracker from '@hcengineering/server-tracker'
import contact from '@hcengineering/contact'
export { serverTrackerId } from '@hcengineering/server-tracker'
@@ -59,6 +60,15 @@ export function createModel (builder: Builder): void {
}
})
builder.createDoc(serverCore.class.Trigger, core.space.Model, {
trigger: serverTracker.trigger.OnWorkspaceOwnerAdded,
txMatch: {
_class: core.class.TxUpdateDoc,
objectClass: contact.class.PersonAccount,
'operations.role': AccountRole.Owner
}
})
builder.mixin(
tracker.ids.AssigneeNotification,
notification.class.NotificationType,