Last week there was a temporary error with email sending that lead to GitLab notification emails not being delivered. The problem should be solved now - however, failed notification emails are not being resent!

Commit cc91d4cf authored by A. Koch's avatar A. Koch

add script to fix digitanz permissions

parent 11eee1c7
Pipeline #1354 failed with stages
in 28 seconds
const GenericAPI = require('mbjs-generic-api')
const run = async function () {
const api = new GenericAPI()
await api.setup()
/**
* Configure resources
*/
const
models = require('mbjs-data-models'),
Service = require('../src/lib/service')
const maps = new Service('maps', api, models.Map)
const results = await maps._client.find({})
for (let map of results) {
if (map.title && map.title.match(/griddle/i)) {
console.log(map.title)
await new Promise((resolve, reject) => {
api._acl.removeAllow('public', map.uuid, ['get'], err => {
if (err) return reject(err)
resolve()
})
})
await new Promise((resolve, reject) => {
api._acl.allow('digitanz', map.uuid, ['get'], err => {
if (err) return reject(err)
resolve()
})
})
}
}
}
run().then(() => process.exit(0))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment