Lunny Xiao
1c80f31f40
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
972373912d
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
7472c4a543
feat(repo): support search repository by topic name ( #4505 )
* feat(repo): support search repository by topic name
6 years ago
B-OnTheGo
e827cc6ca9
Enforce token on api routes [fixed critical security issue #4357 ] ( #4840 )
6 years ago
SagePtr
b6ac42f703
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
ab0cf69397
Allow administrator to create repository for any organization ( #4368 )
7 years ago
Lauris BH
9a28403e94
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
7 years ago
David Schneiderbauer
304bd2ea73
hide issues from org private repos w/o team assignment ( #4034 )
7 years ago
Morlinest
ba440a47e1
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
4cc3379e63
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
45f0a98b84
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
41c109d2da
Fix /api/repo/search integration tests ( #2550 )
7 years ago
Ethan Koenig
914195d73a
Check for access in /repositories/:id ( #2227 )
* Check for access in /repositories/:id
* Integration test
8 years ago
Aaron Walker
e9c98d4242
API: support '/orgs/:org/repos' ( #2047 )
* API: support '/orgs/:org/repos'
8 years ago
Ethan Koenig
a15346a9bd
Fix repo API bug ( #2133 )
Don't require token when not necessary
8 years ago
Ethan Koenig
783199dbbf
Fix GET /users/:username/repos endpoint ( #2125 )
8 years ago
Ethan Koenig
1c10f454eb
Less verbose integration tests ( #2123 )
* Helper functions for intergration test boilerplate
8 years ago
Ethan Koenig
99ee4daba9
Fix improper setup for integration tests ( #2050 )
8 years ago
Ethan Koenig
e4e3367ae7
Display URLs in integration test logs ( #1924 )
8 years ago
Lunny Xiao
40417fa8ff
fix #1643 and improve integration test ( #1645 )
8 years ago
Lunny Xiao
24a1ec995a
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
8 years ago