write access levels
This commit is contained in:
parent
6cd08c32a5
commit
ca026e6017
|
@ -106,7 +106,7 @@ export const saveBackend = async state => {
|
|||
for (let instance of instances_currentFirst) {
|
||||
await api.post(
|
||||
`/_builder/instance/${state.appname}/${instance.id}/api/upgradeData`,
|
||||
{ newHierarchy: state.hierarchy }
|
||||
{ newHierarchy: state.hierarchy, accessLevels: state.accessLevels }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
const StatusCodes = require("../../utilities/statusCodes")
|
||||
|
||||
module.exports = async ctx => {
|
||||
const accessLevels = ctx.request.body.accessLevels
|
||||
accessLevels.version = 0
|
||||
await ctx.instance.authApi.saveAccessLevels(accessLevels)
|
||||
await ctx.instance.templateApi.upgradeData(ctx.request.body.newHierarchy)
|
||||
ctx.response.status = StatusCodes.OK
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue