6af6c656a4
* 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
29 lines
728 B
TypeScript
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
|