Skip to content
Snippets Groups Projects
Commit a05d46bb authored by Sebastian Mihalache's avatar Sebastian Mihalache
Browse files

fix authsome author permission

parent d3bd0fc0
No related branches found
No related tags found
1 merge request!21Sprint #16 features
...@@ -96,6 +96,10 @@ async function applyAuthenticatedUserPolicy(user, operation, object, context) { ...@@ -96,6 +96,10 @@ async function applyAuthenticatedUserPolicy(user, operation, object, context) {
user, user,
Team: context.models.Team, Team: context.models.Team,
}) })
if (collection.owners.map(o => o.id).includes(user.id)) {
return collection
}
// TODO: check why collPermission can be undefined // TODO: check why collPermission can be undefined
const collPermission = userPermissions.find( const collPermission = userPermissions.find(
p => p =>
......
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