forked from vikunja/vikunja
fix rebase error
This commit is contained in:
parent
c1826ff612
commit
f4b9e5989a
|
@ -1196,54 +1196,6 @@ func (err ErrOIDCTeamsDoNotExistForUser) HTTPError() web.HTTPError {
|
||||||
return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeTeamDoesNotExist, Message: "No Teams with property oidcId could be found for User."}
|
return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeTeamDoesNotExist, Message: "No Teams with property oidcId could be found for User."}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrOIDCTeamDoesNotExist represents an error where a team with specified name and specified oidcId property does not exist
|
|
||||||
type ErrOIDCTeamDoesNotExist struct {
|
|
||||||
OidcID string
|
|
||||||
Name string
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsErrOIDCTeamDoesNotExist checks if an error is ErrOIDCTeamDoesNotExist.
|
|
||||||
func IsErrOIDCTeamDoesNotExist(err error) bool {
|
|
||||||
_, ok := err.(ErrOIDCTeamDoesNotExist)
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// ErrTeamDoesNotExist represents an error where a team does not exist
|
|
||||||
func (err ErrOIDCTeamDoesNotExist) Error() string {
|
|
||||||
return fmt.Sprintf("No Team with that name and valid property oidcId could be found [Team Name: %v] [OidcId : %v] ", err.Name, err.OidcID)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ErrCodeTeamDoesNotExist holds the unique world-error code of this error
|
|
||||||
const ErrCodeOIDCTeamDoesNotExist = 6008
|
|
||||||
|
|
||||||
// HTTPError holds the http error description
|
|
||||||
func (err ErrOIDCTeamDoesNotExist) HTTPError() web.HTTPError {
|
|
||||||
return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeTeamDoesNotExist, Message: "No Team with that name and valid property oidcId could be found."}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ErrOIDCTeamsDoNotExistForUser represents an error where an oidcTeam does not exist for the user
|
|
||||||
type ErrOIDCTeamsDoNotExistForUser struct {
|
|
||||||
UserID int64
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsErrOIDCTeamsDoNotExistForUser checks if an error is ErrOIDCTeamsDoNotExistForUser.
|
|
||||||
func IsErrOIDCTeamsDoNotExistForUser(err error) bool {
|
|
||||||
_, ok := err.(ErrOIDCTeamsDoNotExistForUser)
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
func (err ErrOIDCTeamsDoNotExistForUser) Error() string {
|
|
||||||
return fmt.Sprintf("No Teams with property oidcId could be found for User [User ID: %d]", err.UserID)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ErrCodeTeamDoesNotExist holds the unique world-error code of this error
|
|
||||||
const ErrCodeOIDCTeamsDoNotExistForUser = 6009
|
|
||||||
|
|
||||||
// HTTPError holds the http error description
|
|
||||||
func (err ErrOIDCTeamsDoNotExistForUser) HTTPError() web.HTTPError {
|
|
||||||
return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeTeamDoesNotExist, Message: "No Teams with property oidcId could be found for User."}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ====================
|
// ====================
|
||||||
// User <-> Project errors
|
// User <-> Project errors
|
||||||
// ====================
|
// ====================
|
||||||
|
|
Loading…
Reference in New Issue
Block a user