Skip to content

Commit

Permalink
Move AddCollabrator and CreateRepositoryByExample to service layer (#…
Browse files Browse the repository at this point in the history
…32419)

- [x] Move `CreateRepositoryByExample` to service layer
- [x] Move `AddCollabrator` to service layer
- [x] Add a new parameter for `AddCollabrator` so that changing mode
immediately after that will become unnecessary.
  • Loading branch information
lunny authored Nov 7, 2024
1 parent 913be9e commit 276500c
Show file tree
Hide file tree
Showing 19 changed files with 231 additions and 499 deletions.
3 changes: 3 additions & 0 deletions models/perm/access_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ func ParseAccessMode(permission string, allowed ...AccessMode) AccessMode {
}
return util.Iif(slices.Contains(allowed, m), m, AccessModeNone)
}

// ErrInvalidAccessMode is returned when an invalid access mode is used
var ErrInvalidAccessMode = util.NewInvalidArgumentErrorf("Invalid access mode")
48 changes: 0 additions & 48 deletions modules/repository/collaborator.go

This file was deleted.

280 changes: 0 additions & 280 deletions modules/repository/collaborator_test.go

This file was deleted.

Loading

0 comments on commit 276500c

Please sign in to comment.