Skip to content

Commit 567c448

Browse files
Fix: Allow adding new users to team even if user not in user table (#69)
1 parent 183abdf commit 567c448

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

app/controller/tenant/membership.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (c *Controller) CreateTenantMembership(ctx context.Context, tenant *types.T
3232

3333
principal, err := c.userCtrl.FindUserByEmail(ctx, in.Email)
3434
if err != nil {
35-
if !errors.IsNotFound(err) {
35+
if !store.IsNotFound(err) {
3636
return err
3737
}
3838
}

store/errors.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ var (
1818
"spaces or repos")
1919
ErrPreConditionFailed = errors.New("precondition failed")
2020
)
21+
22+
func IsNotFound(err error) bool {
23+
return errors.Is(err, ErrResourceNotFound)
24+
}

0 commit comments

Comments
 (0)