Commit Graph

13 Commits

Author SHA1 Message Date
Frode Aannevik
ffbb0f6a60 token: disallow multiple tokens with same name (#5820)
* api/v1: don't allow multiple tokens with same name

Fail with 422 Unprocessable Entity if the token name
already exist

ref: https://github.com/gogs/gogs/issues/5587

* Move new token error type to models/errors/token

* Remove "useless" ListAccessTokensByName function

* Add an i18n entry for token_name_exists
2019-10-15 14:09:47 -07:00
Unknwon
69c1cd3f38 routes/api: change status handle to new style
Also fixed one bug that did not catch team not found error.
2018-12-01 21:41:30 -05:00
Unknwon
512a900202 repo/editor: hide internal error detail
Prevent exposure of server path
2018-08-17 23:35:53 +08:00
Unknwon
f2ecfdc96a auth: support authentication source config file (#3142) 2018-04-12 09:55:58 -04:00
Unknwon
1f7983059a models: move ErrBranchNotExist to errors package 2018-03-08 07:15:55 -05:00
Unknwon
181dc5d75e editor: remove out of sync branch before checkout again
If a branch was deleted from server, sometimes it is not reflected
on local copy. Therefore, we need to remove the branch with same
name if it is out of sync and then checkout to correct version.
2017-11-16 00:03:35 -05:00
Unknwon
9e3c83372f api/repo: improve migration error handling 2017-04-07 16:00:25 -04:00
Unknwon
a617d52374 2fa: initial support (#945) 2017-04-06 00:14:30 -04:00
Unknwon
beee6e03b1 error: move ErrRepoNotExist -> errors.RepoNotExist 2017-03-23 14:27:34 -04:00
Unknwon
85a050fca7 issue: fix redirect to random issue if index does not exist (#4315) 2017-03-22 13:20:29 -04:00
Unknwon
2807274e2d repo/webhook: able to retrigger delivery history (#2187) 2017-03-19 17:44:46 -04:00
Unknwon
0ccd7c97ab models: rename ErrUserNotExist -> errors.UserNotExist 2017-03-16 17:18:43 -04:00
Unknwon
05dbd3f7d7 refactoring: experimental with models/errors package 2017-03-12 00:47:34 -05:00