mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: unique constrains of project grant (#1497)
This commit is contained in:
parent
1771ce40b4
commit
868749e9c0
@ -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))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user