mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix(team): show public teams to non-members
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
2 files changed
+14
-2
No files matched your search
@@ -198,6 +198,12 @@ func IsNotFound(err error) bool {
|
||||
return ok && failure.Status == http.StatusNotFound
|
||||
}
|
||||
|
||||
// IsForbidden reports whether err is a 403 response.
|
||||
func IsForbidden(err error) bool {
|
||||
failure, ok := errors.AsType[*transport.APIError](err)
|
||||
return ok && failure.Status == http.StatusForbidden
|
||||
}
|
||||
|
||||
// refusal returns the conflict reason of a refused request, or "".
|
||||
func refusal(apiErr *transport.APIError) string {
|
||||
if apiErr.Status == http.StatusLocked {
|
||||
|
||||
Reference in new issue
Block a user