Fix project permissons (anybody in org could see the list of projects) (#4201)

main
Nikita Manovich 4 years ago committed by GitHub
parent 2a417a980c
commit 5e59ba1791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -88,12 +88,23 @@ filter = [] { # Django Q object to filter list of entries
utils.is_admin
utils.is_sandbox
} else = qobject {
utils.is_admin
utils.is_organization
qobject := [ {"organization": input.auth.organization.id} ]
} else = qobject {
utils.is_sandbox
user := input.auth.user
qobject := [ {"owner_id": user.id}, {"assignee_id": user.id}, "|"]
qobject := [ {"owner_id": user.id}, {"assignee_id": user.id}, "|" ]
} else = qobject {
utils.is_organization
utils.has_perm(utils.USER)
organizations.has_perm(organizations.MAINTAINER)
qobject := [ {"organization": input.auth.organization.id} ]
} else = qobject {
organizations.has_perm(organizations.WORKER)
user := input.auth.user
qobject := [ {"owner_id": user.id}, {"assignee_id": user.id}, "|",
{"organization": input.auth.organization.id}, "&" ]
}
allow {

Loading…
Cancel
Save