summaryrefslogtreecommitdiffstats
path: root/models/org_team_test.go
Commit message (Collapse)AuthorAgeFilesLines
* api: Add missing GET teams endpoints (#5382)Harshit Bansal2019-01-161-1/+15
| | | | | | | | | | | | | | | | | | | | * 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.
* Approvals at Branch Protection (#5350)Jonas Franz2018-12-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | * 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>
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix ignored errors when checking if organization, team member (#3177)Ethan Koenig2017-12-211-7/+12
|
* Fix typos in models/ and modules/ (#1248)Ethan Koenig2017-03-151-3/+3
|
* Refactor and fix incorrect comment (#1247)Ethan Koenig2017-03-151-1/+1
|
* Remove unnecessary loads in org_team (#1035)Ethan Koenig2017-02-241-3/+3
|
* Bug fixes and unit tests for org_team (#1016)Ethan Koenig2017-02-231-0/+343