fix: unique constrains of project grant (#1497)

This commit is contained in:
Livio Amstutz
2021-03-30 13:01:14 +02:00
committed by GitHub
parent 1771ce40b4
commit 868749e9c0

View File

@@ -23,14 +23,14 @@ var (
func NewAddProjectGrantUniqueConstraint(grantedOrgID, projectID string) *eventstore.EventUniqueConstraint {
return eventstore.NewAddEventUniqueConstraint(
UniqueRoleType,
UniqueGrantType,
fmt.Sprintf("%s:%s", grantedOrgID, projectID),
"Errors.Project.Grant.AlreadyExists")
}
func NewRemoveProjectGrantUniqueConstraint(grantedOrgID, projectID string) *eventstore.EventUniqueConstraint {
return eventstore.NewRemoveEventUniqueConstraint(
UniqueRoleType,
UniqueGrantType,
fmt.Sprintf("%s:%s", grantedOrgID, projectID))
}