Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Motion Bank
Services
Motion Bank API
Commits
cc91d4cf
Commit
cc91d4cf
authored
Sep 23, 2018
by
A. Koch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add script to fix digitanz permissions
parent
11eee1c7
Pipeline
#1354
failed with stages
in 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
bin/digitanz-fix.js
bin/digitanz-fix.js
+35
-0
No files found.
bin/digitanz-fix.js
0 → 100644
View file @
cc91d4cf
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
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment