···163 return e.E.Enforce(user, domain, repo, "repo:settings")
164}
1650000166// keyMatch2Func is a wrapper for keyMatch2 to make it compatible with Casbin
167func keyMatch2Func(args ...interface{}) (interface{}, error) {
168 name1 := args[0].(string)
···163 return e.E.Enforce(user, domain, repo, "repo:settings")
164}
165166+func (e *Enforcer) IsCollaboratorInviteAllowed(user, domain, repo string) (bool, error) {
167+ return e.E.Enforce(user, domain, repo, "repo:invite")
168+}
169+170// keyMatch2Func is a wrapper for keyMatch2 to make it compatible with Casbin
171func keyMatch2Func(args ...interface{}) (interface{}, error) {
172 name1 := args[0].(string)