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
77d10ea5
Commit
77d10ea5
authored
Aug 14, 2018
by
A. Koch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix acl role check
parent
0d9e8e97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/lib/service.js
src/lib/service.js
+2
-2
No files found.
src/lib/service.js
View file @
77d10ea5
...
...
@@ -35,7 +35,7 @@ class Service extends TinyEmitter {
if
(
req
.
user
&&
entry
.
author
&&
entry
.
author
.
id
===
user
)
allowed
=
true
else
{
try
{
allowed
=
await
this
.
_acl
.
i
sAllowed
(
'
public
'
,
entry
.
uuid
,
'
get
'
)
allowed
=
await
this
.
_acl
.
areAnyRole
sAllowed
(
[
'
public
'
]
,
entry
.
uuid
,
[
'
get
'
]
)
}
catch
(
err
)
{
this
.
_logger
.
error
(
`ACL error:
${
err
.
message
}
`
)
...
...
@@ -53,7 +53,7 @@ class Service extends TinyEmitter {
if
(
req
.
user
&&
result
.
author
&&
result
.
author
.
id
===
req
.
user
.
uuid
)
allowed
=
true
else
{
try
{
allowed
=
await
this
.
_acl
.
i
sAllowed
(
'
public
'
,
result
.
uuid
,
'
get
'
)
allowed
=
await
this
.
_acl
.
areAnyRole
sAllowed
(
[
'
public
'
]
,
result
.
uuid
,
[
'
get
'
]
)
}
catch
(
err
)
{
this
.
_logger
.
error
(
`ACL error:
${
err
.
message
}
`
)
...
...
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