Lanre Adelowo
22ef957c97
make sure units of a team are returned ( #6379 )
7 years ago
sebastian-sauer
146f3f77e9
Config option to disable automatic repo watching ( #5852 )
Add a new config option to enable / disable the automatic watching of
repos for new repositories and if a user is added to a team.
Fixes #653
Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
7 years ago
Harshit Bansal
8c26a74a55
api: Add missing GET teams endpoints ( #5382 )
* api: Add an endpoint to list a particular member of team.
* models: Rename `GetUserTeams()` to `GetUserOrgTeams()` in `org_team` model.
`GetUserTeams()` sounds a bit misnomer since it actually returns
the teams that user belongs to in a given organization rather than
all the teams across all the organization that the user has joined.
* models: Add `GetUserTeams()`.
Returns all the teams that a user belongs to.
* api: Add an endpoint for GET '/user/teams'.
A GET request to this endpoint lists all the teams that a user
belongs to.
7 years ago
Jonas Franz
3e46f5d38e
Approvals at Branch Protection ( #5350 )
* Add branch protection for approvals
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add required approvals
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add missing comments and fmt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add type = approval and group by reviewer_id to review
* Prevent users from adding negative review limits
* Add migration for approval whitelists
Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
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
7 years ago
Lunny Xiao
43259b6c65
Fix create team, update team missing units ( #5188 )
7 years ago
Lunny Xiao
e1304f1303
fix bug when users have serval teams with different units on different repositories ( #5307 )
7 years ago
Lunny Xiao
712ad9cd0b
Fix sqlite lock ( #5176 )
* fix sqlite lock
* fix sqlite lock on getUnitType
7 years ago
David Schneiderbauer
304bd2ea73
hide issues from org private repos w/o team assignment ( #4034 )
7 years ago
David Schneiderbauer
0ddfbb2b15
Fix not removed watches on unallowed repositories ( #4201 )
7 years ago
Wendell Sun
74811ce4c8
Fix remove team member issue ( #3566 )
Put sess.Commit() out of the RemoveOrgUser function
Add an empty line to separate import packages
8 years ago
Ethan Koenig
9621d3f074
Remove IsOwner, NumTeams from OrgUser ( #3269 )
8 years ago
Ethan Koenig
127ea89ad4
Fix race condition in team functions ( #3268 )
8 years ago
Ethan Koenig
a8af5abc02
Fix ignored errors when checking if organization, team member ( #3177 )
8 years ago
Ethan Koenig
a186f896eb
Replace deprecated Id method with ID ( #2655 )
8 years ago
Lunny Xiao
1a57c8f911
Reduce usage of allcols on update ( #2596 )
* reduce usage of allcols on update
* fix bug and tests
8 years ago
Lunny Xiao
1c80057b53
improve protected branch to add whitelist support ( #2451 )
* improve protected branch to add whitelist support
* fix lint
* fix style check
* fix tests
* fix description on UI and import
* fix test
* bug fixed
* fix tests and languages
* move isSliceInt64Eq to util pkg; improve function names & typo
8 years ago
Ethan Koenig
835e335242
EnableUnit() -> UnitEnabled() ( #2242 )
8 years ago
Antoine GIRARD
8d81576b4b
Improve org error handling ( #2117 )
* Improve ErrOrgNotExist type
Return new error type
Use good error check
Use new method to check error
Update tests
* Fix unchanged method name report
8 years ago
Lauris BH
625f482b25
Refactor session close as xorm already does everything needed internally ( #2020 )
8 years ago
Lunny Xiao
c694c70008
Add units to team ( #947 )
* add units to team
* fix lint
* finish team setting backend
* finished permission controll on routes
* fix import blank line
* add unit check on ssh/http pull and push and fix test failed
* fix fixtures data
* remove unused code
8 years ago
Sandro Santilli
7ef4727cca
Run "make fmt" with go-1.6 ( #1333 )
9 years ago
Ethan Koenig
c2ba9ca97b
Refactor and fix incorrect comment ( #1247 )
9 years ago
Ethan Koenig
228aa19e31
Remove unnecessary loads in org_team ( #1090 )
9 years ago
Ethan Koenig
1dc6a2df45
Remove unnecessary loads in org_team ( #1035 )
9 years ago
Ethan Koenig
9f592025a8
Bug fixes and unit tests for org_team ( #1016 )
9 years ago
Lunny Xiao
b5e80c80b6
optimization for team get repos ( #953 )
9 years ago
Lunny Xiao
40f6ec8232
Small opitimization for getUserTeams ( #954 )
* Small opitimization for getUserTeams
* more compact
9 years ago
Lunny Xiao
1e4337d0a2
fix xorm NewSession uncorrected usages ( #774 )
9 years ago
Lunny Xiao
779dc46d45
rename all uID -> userID on models/org_team.go
9 years ago
Lunny Xiao
779922bc61
golint for models/org_team.go
9 years ago
Thibault Meyer
5d29fda874
Rewrite XORM queries
9 years ago
Sandro Santilli
58cc4e56fa
ACCESS_MODE_* -> AccessMode*
9 years ago
LefsFlare
5c54551ac9
Adds checking of reserved keywords against team names ( #22 )
9 years ago
Unknwon
3b42ab0e57
Refactor User.Id to User.ID
9 years ago
Unknwon
8328452c5a
#1692 add admin APIs to add/remove a user from teams
10 years ago