sebastian-sauer
84076211b3
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>
2019-01-27 09:25:21 +00:00
Harshit Bansal
5ac6da3c41
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.
2019-01-16 19:39:50 -05:00
Jonas Franz
9681c83734
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>
2018-12-11 19:28:37 +08:00
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
2018-11-28 19:26:14 +08:00
Lunny Xiao
b3000ae623
Fix create team, update team missing units ( #5188 )
2018-11-10 14:45:32 -05:00
Lunny Xiao
c5d098c32e
fix bug when users have serval teams with different units on different repositories ( #5307 )
2018-11-09 08:16:52 +02:00
Lunny Xiao
5f938c0c78
Fix sqlite lock ( #5176 )
...
* fix sqlite lock
* fix sqlite lock on getUnitType
2018-10-25 18:55:16 +08:00
David Schneiderbauer
0b3ea42847
hide issues from org private repos w/o team assignment ( #4034 )
2018-06-21 12:00:13 -04:00
David Schneiderbauer
a93f13849c
Fix not removed watches on unallowed repositories ( #4201 )
2018-06-19 15:44:33 -04:00
Wendell Sun
2d1c5c3756
Fix remove team member issue ( #3566 )
...
Put sess.Commit() out of the RemoveOrgUser function
Add an empty line to separate import packages
2018-02-23 16:42:02 +08:00
Ethan Koenig
f48680888c
Remove IsOwner, NumTeams from OrgUser ( #3269 )
2018-01-08 09:48:37 +02:00
Ethan Koenig
c64924682e
Fix race condition in team functions ( #3268 )
2017-12-30 21:08:08 -06:00
Ethan Koenig
515cdaa85d
Fix ignored errors when checking if organization, team member ( #3177 )
2017-12-21 09:43:26 +02:00
Ethan Koenig
aa962deec0
Replace deprecated Id method with ID ( #2655 )
2017-10-05 07:43:04 +03:00
Lunny Xiao
dd55534b82
Reduce usage of allcols on update ( #2596 )
...
* reduce usage of allcols on update
* fix bug and tests
2017-09-25 12:59:27 +08:00
Lunny Xiao
1739e84ac0
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
2017-09-14 16:16:22 +08:00
Ethan Koenig
f29458bd3a
EnableUnit() -> UnitEnabled() ( #2242 )
2017-08-02 11:46:54 +03:00
Antoine GIRARD
30787e48f2
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
2017-07-06 21:30:19 +08:00
Lauris BH
6db387a21e
Refactor session close as xorm already does everything needed internally ( #2020 )
2017-06-21 08:57:05 +08:00
Lunny Xiao
fd6034aaf2
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
2017-05-18 22:54:24 +08:00
Sandro Santilli
f73e734411
Run "make fmt" with go-1.6 ( #1333 )
2017-03-21 08:55:00 +08:00
Ethan Koenig
ec0ae5d50c
Refactor and fix incorrect comment ( #1247 )
2017-03-15 08:51:46 +08:00
Ethan Koenig
d21d5fd736
Remove unnecessary loads in org_team ( #1090 )
2017-03-01 09:09:49 +08:00
Ethan Koenig
76057105ca
Remove unnecessary loads in org_team ( #1035 )
2017-02-24 14:25:09 +08:00
Ethan Koenig
4f3880ff15
Bug fixes and unit tests for org_team ( #1016 )
2017-02-23 09:36:15 +08:00
Lunny Xiao
7fd14bf7bd
optimization for team get repos ( #953 )
2017-02-16 12:07:58 +08:00
Lunny Xiao
0642cb330c
Small opitimization for getUserTeams ( #954 )
...
* Small opitimization for getUserTeams
* more compact
2017-02-16 12:06:23 +08:00
Lunny Xiao
bb5a6b7a07
fix xorm NewSession uncorrected usages ( #774 )
2017-01-28 00:11:41 +08:00
Lunny Xiao
f215d78157
rename all uID -> userID on models/org_team.go
2016-11-28 16:33:08 +08:00
Lunny Xiao
21846d16e5
golint for models/org_team.go
2016-11-28 09:30:08 +08:00
Thibault Meyer
a4454f5d0f
Rewrite XORM queries
2016-11-10 20:59:51 +01:00
Sandro Santilli
f388661bda
ACCESS_MODE_* -> AccessMode*
2016-11-07 17:20:37 +01:00
LefsFlare
55a4d46f5d
Adds checking of reserved keywords against team names ( #22 )
2016-11-06 10:07:03 +01:00
Unknwon
1f2e173a74
Refactor User.Id to User.ID
2016-07-24 01:08:22 +08:00
Unknwon
b1d41cfa60
#1692 add admin APIs to add/remove a user from teams
2016-03-25 18:04:02 -04:00