Files
speckle-server/packages/server/modules/automations/index.ts
T
Kristaps Fabians Geikins 6af6c656a4 feat(fe2): app authorization workflow redesign [WBX-217] (#2044)
* WIP

* new permissions table

* permissions grouped

* updated scope descriptions

* more scope copy adjustments

* allow auth error handling

* manually closable toast notification

* fixed mentions rendering

* error view

* not you? feature

* cleanup

* minor styling changes

* WIP table

* finished authorized apps table

* minor cleanup

* cleaning up comment

* testing changes
2024-02-23 16:50:07 +02:00

29 lines
728 B
TypeScript

import { moduleLogger } from '@/logging/logging'
import { ScopeRecord } from '@/modules/auth/helpers/types'
import { registerOrUpdateScope } from '@/modules/shared'
import { SpeckleModule } from '@/modules/shared/helpers/typeHelper'
import { Scopes } from '@speckle/shared'
async function initScopes() {
const scopes: ScopeRecord[] = [
{
name: Scopes.Automate.ReportResults,
description: 'Report automation results to the server.',
public: true
}
]
for (const scope of scopes) {
await registerOrUpdateScope(scope)
}
}
const automationModule: SpeckleModule = {
async init() {
moduleLogger.info('🤖 Init automations module')
await initScopes()
}
}
export = automationModule