22 Commits (d10a668ffc4ed2a81a8a62ee78f0885ede713ddd)

Author SHA1 Message Date
Bogdan Petrea 583968f274 Return 409 when creating repo if it already exists. (#6330) 5 years ago
Lunny Xiao eabbddcd98
Restrict permission check on repositories and fix some problems (#5314)
* fix units permission problems

* fix some bugs and merge LoadUnits to repoAssignment

* refactor permission struct and add some copyright heads

* remove unused codes

* fix routes units check

* improve permission check

* add unit tests for permission

* fix typo

* fix tests

* fix some routes

* fix api permission check

* improve permission check

* fix some permission check

* fix tests

* fix tests

* improve some permission check

* fix some permission check

* refactor AccessLevel

* fix bug

* fix tests

* fix tests

* fix tests

* fix AccessLevel

* rename CanAccess

* fix tests

* fix comment

* fix bug

* add missing unit for test repos

* fix bug

* rename some functions

* fix routes check
6 years ago
Daniel Balko 3379141d81 API: '/orgs/:org/repos': return private repos with read access (#5310) (#3829) (#5383)
Signed-off-by: Daniel Balko <inxonic+github@gmail.com>
6 years ago
Bo-Yi Wu ea20adaa84
feat(repo): support search repository by topic name (#4505)
* feat(repo): support search repository by topic name
6 years ago
B-OnTheGo e47df0b301 Enforce token on api routes [fixed critical security issue #4357] (#4840) 6 years ago
SagePtr bf55276189 Fix redirect with non-ascii branch names (#4764) (#4810)
* Fix redirect with non-ascii branch names (#4764)

* Add integration tests for non-ascii branch redirect

* Fix mysql test and coverage test
6 years ago
Lauris BH 69e2ab1611 Allow administrator to create repository for any organization (#4368) 6 years ago
Lauris BH 4a8ee0b5cc
Check that repositories can only be migrated to own user or organizations (#4366)
* Repositories can only migrated to own user or organizations

* Add check for organization that user does not belong to

* Allow admin to migrate repositories for other users
6 years ago
David Schneiderbauer 0b3ea42847 hide issues from org private repos w/o team assignment (#4034) 6 years ago
Morlinest ddb7f59ef4 Add search mode option to /api/repo/search (#2756)
* Add repo type option to /api/repo/search

* Add tests and fix result of collaborative filter in specific condition

* Fix/optimize search & tests

* Improve integration tests

* Fix lint errors

* Fix unit tests

* Change and improve internal implementation of repo search

* Use NonexistentID

* Make search api more general

* Change mirror and fork search behaviour

* Fix tests & typo in comment
7 years ago
Morlinest ccd3577970 Fix repository search function (#2689)
* Fix and remove FIXME

* Respect membership visibility

* Fix/rewrite searchRepositoryByName function

* Add unit tests

* Add integration tests

* Remove Searcher completely

* Remove trailing space
7 years ago
Morlinest c2346e4469 Add repository search unit and integration tests (#2575)
* Add more repo search tests

* Fix repo search tests

* Always test returned repos length

* Add test with lower pagesize limit (test more pages)

* Add and fix /api/repo/search integration tests

* Simplify unit tests code

* Simplify and unify integration tests code

* Improve test coverage

* Temporary fix tests due to bugs in current repo search implementation

* Revert removing not nil Searcher

* Add more checks to tests

* Simplify privacy checks in /api/repo tests

* Temporary remove privacy check from repo search tests
7 years ago
Morlinest 80b430d7c0 Fix /api/repo/search integration tests (#2550) 7 years ago
Ethan Koenig 49df677c47 Check for access in /repositories/:id (#2227)
* Check for access in /repositories/:id

* Integration test
7 years ago
Aaron Walker 6a3c03762a API: support '/orgs/:org/repos' (#2047)
* API: support '/orgs/:org/repos'
7 years ago
Ethan Koenig 93a1de4842 Fix repo API bug (#2133)
Don't require token when not necessary
7 years ago
Ethan Koenig 8f1d62ad3b Fix GET /users/:username/repos endpoint (#2125) 7 years ago
Ethan Koenig f1adaef458 Less verbose integration tests (#2123)
* Helper functions for intergration test boilerplate
7 years ago
Ethan Koenig 4c0e567062 Fix improper setup for integration tests (#2050) 7 years ago
Ethan Koenig 61716bd8f7 Display URLs in integration test logs (#1924) 7 years ago
Lunny Xiao 0308d44a16 fix #1643 and improve integration test (#1645) 7 years ago
Lunny Xiao 61b08b5c01 bug fixed for API to get user's repos (#1622)
* bug fixed for API to get user's repos

* add tests and fix another place

* test user2 since user1 has no repos
7 years ago