bug: uniqueness constraints are not enforced when creating CoreObjectPermission and CoreGlobalPermission nodes #5132
Labels
group/backend
Issue related to the backend (API Server, Git Agent)
priority/2
This issue stalls work on the project or its dependents, it's a blocker for a release
type/bug
Something isn't working as expected
Component
API Server / GraphQL
Infrahub version
stable
Current Behavior
You can create duplicate CoreObjectPermission and CoreGlobalPermission nodes that violate the uniqueness constraints that they have defined on them. However the schema integrity check in the CI does seem to pick up the issue.
CoreObjectPermission has an uniqueness constraint on
namespace__value, name__value, action__value, decision__value
CoreGlobalPermission has an uniqueness constraint on
action__value, decision__value
Expected Behavior
You cannot create duplicate object permission or global permission objects, or the uniqueness constraints have to be removed.
Steps to Reproduce
global:manage_schema:allow_all
2 timesobject:*:Tag:create:allow_all
2 timesAdditional Information
No response
The text was updated successfully, but these errors were encountered: