24 Commits

Author SHA1 Message Date
Unknwon
613139e7be
Enable Go modules (#5835)
* Remove vendor

* Enable Go modules

* ci: add command to fetch dependencies

* ci: update setting

* ci: update settings

* Require Go 1.11

* Rename module name to gogs.io/gogs
2019-10-23 23:03:17 -07:00
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
Sauyon Lee
11f79a2095 api/v1: fix status response in checkUserFollowing (#5812) 2019-10-02 19:00:26 -07:00
unknwon
f1e0ebfe93
routes/api/v1: codemod 2019-08-10 13:40:48 -07:00
unknwon
c7ba519af2
routes/api/v1: codemod 2019-08-08 23:53:43 -07:00
unknwon
c3af3ff1d0
routes/api: fix permission checks for routes
Reported by @ManassehZhou #5764
2019-08-01 18:36:05 -07:00
unknwon
1592e578ed
routes/api: add missing permission checks for routes
Permission check not enforced for deploy keys, collaborators, and hooks.

Reported by @ManassehZhou #5764
2019-08-01 18:26:05 -07:00
Unknwon
f91cb9321e
api: add GetReferenceSHA (#5546) 2018-12-16 19:47:32 -05:00
Unknwon
ee82d35ed8
api: add GetSingleCommit (#5546) 2018-12-15 00:24:41 -05:00
Unknwon
98114944fc
vendor: update github.com/gogs/go-gogs-client
Bring fixes for #5538
2018-12-03 14:45:19 -05:00
Unknwon
e1b3a25008
api/repo: support edit repository issue tracker (gogs/go-gogs-client#94) 2018-12-02 12:55:05 -05: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
ce13fbb98a
routes/api: allow get repository without login (#5475) 2018-12-01 21:40:19 -05:00
Unknwon
3db9b06a6e
api: fix critical CSRF vulnerabilities on API routes (#5355)
By explicitly requires token authentication.
2018-11-28 21:05:58 -05:00
oOOps
f9bc980b0b api: correct pagination in repository search api (#5293) 2018-06-13 21:55:09 +08:00
Unknwon
fbecc18e2e
*: use jsoniter to replace encoding/json 2018-06-09 17:32:58 +08:00
Unknwon
aff4208244
*: rename "gogits" to "gogs" 2018-05-27 08:53:48 +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
Anton Antonov
77c77fbd42 api: add endpoint /api/v1/user/orgs (#4835)
* Add API endpoint /api/v1/user/orgs

The difference between this endpoint and
/api/v1/admin/users/<username>/orgs,
is that here you're creating a repo with the `user`
that corresponds to the API token you're using.

* Extract duplicate API org creation
2017-11-13 22:27:30 -05:00
Unknwon
ea313d0c1e
SECURITY: HTML injection in user search API
Reported by Tim Hawes.
2017-10-14 23:53:20 -04:00
Unknwon
8ed2330d6e
issue_comment: fix pg syntax ambiguous (#4586)
Also handle error related to time parsing.
2017-06-27 20:21:36 -04:00
Unknwon
11b1498a6e
api/repo: load attributes when listing user repositories (#4565) 2017-06-21 17:41:18 -04:00
Unknwon
4400d2fdd9
Refactoring: rename package routers -> routes 2017-06-11 00:34:14 -04:00