write access levels
This commit is contained in:
parent
220f128d84
commit
00eb3ce13a
|
@ -106,7 +106,7 @@ export const saveBackend = async state => {
|
||||||
for (let instance of instances_currentFirst) {
|
for (let instance of instances_currentFirst) {
|
||||||
await api.post(
|
await api.post(
|
||||||
`/_builder/instance/${state.appname}/${instance.id}/api/upgradeData`,
|
`/_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")
|
const StatusCodes = require("../../utilities/statusCodes")
|
||||||
|
|
||||||
module.exports = async ctx => {
|
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)
|
await ctx.instance.templateApi.upgradeData(ctx.request.body.newHierarchy)
|
||||||
ctx.response.status = StatusCodes.OK
|
ctx.response.status = StatusCodes.OK
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue