summaryrefslogtreecommitdiffstats
path: root/models/org_team.go
Commit message (Collapse)AuthorAgeFilesLines
* Fix approvals counting (#7757)Lunny Xiao2019-08-071-3/+6
| | | | | | | | * fix approvals counting * fix tests * fmt
* org/members: display 2FA members states + optimize sql requests (#7621)Antoine GIRARD2019-08-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * org/members: display 2FA state * fix comment typo * lay down UserList bases * add basic test for previous methods * add comment for UserList type * add valid two-fa account * test new UserList methods * optimize MembersIsPublic by side loading info on GetMembers + fix integrations tests * respect fmt rules * use map for data * Optimize GetTwoFaStatus * rewrite by using existing sub func * Optimize IsUserOrgOwner * remove un-used code * tests: cover empty org + fix import order * tests: add ErrTeamNotExist path * tests: fix wrong expected result
* Add golangci (#6418)kolaente2019-06-121-7/+24
|
* Trace Logging on Permission Denied & ColorFormat (#6618)zeripath2019-04-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add log.ColorFormat and log.ColorFormatted Structs can now implement log.ColorFormatted to provide their own colored format when logged with `%-v` or additional flags. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add basic ColorFormat to repository and user Signed-off-by: Andrew Thornton <art27@cantab.net> * Add basic ColorFormat to access and unit Signed-off-by: Andrew Thornton <art27@cantab.net> * Add ColorFormat to permission and on trace log it Signed-off-by: Andrew Thornton <art27@cantab.net> * Add log.NewColoredIDValue to make ID value coloring consistent Signed-off-by: Andrew Thornton <art27@cantab.net> * formatting changes * Add some better tracing to permission denied for read issues/pulls Signed-off-by: Andrew Thornton <art27@cantab.net> * Add Trace logging on permission denied Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove isTrace() check from deferred func * Adjust repo and allow logging of team * use FormatInt instead of Itoa * Add blank line Signed-off-by: Andrew Thornton <art27@cantab.net> * Update access.go
* Fixes #6446 - Sort team members and team's repositories (#6525)ngourdon2019-04-071-1/+7
| | | | | | * sort team's repositories by name * sort team members by display name
* Better logging (#6038) (#6095)zeripath2019-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
* make sure units of a team are returned (#6379)Lanre Adelowo2019-03-191-0/+5
|
* Config option to disable automatic repo watching (#5852)sebastian-sauer2019-01-271-9/+16
| | | | | | | | | 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>
* api: Add missing GET teams endpoints (#5382)Harshit Bansal2019-01-161-4/+16
| | | | | | | | | | | | | | | | | | | | * 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/+8
| | | | | | | | | | | | | | | | | | | | | | * 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-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 create team, update team missing units (#5188)Lunny Xiao2018-11-101-0/+26
|
* fix bug when users have serval teams with different units on different ↵Lunny Xiao2018-11-091-0/+10
| | | | repositories (#5307)
* Fix sqlite lock (#5176)Lunny Xiao2018-10-251-1/+5
| | | | | | * fix sqlite lock * fix sqlite lock on getUnitType
* hide issues from org private repos w/o team assignment (#4034)David Schneiderbauer2018-06-211-11/+75
|
* Fix not removed watches on unallowed repositories (#4201)David Schneiderbauer2018-06-191-0/+49
|
* Fix remove team member issue (#3566)Wendell Sun2018-02-231-1/+13
| | | | | Put sess.Commit() out of the RemoveOrgUser function Add an empty line to separate import packages
* Remove IsOwner, NumTeams from OrgUser (#3269)Ethan Koenig2018-01-081-35/+0
|
* Fix race condition in team functions (#3268)Ethan Koenig2017-12-301-5/+6
|
* Fix ignored errors when checking if organization, team member (#3177)Ethan Koenig2017-12-211-11/+20
|
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-051-10/+10
|
* Reduce usage of allcols on update (#2596)Lunny Xiao2017-09-251-5/+5
| | | | | | * reduce usage of allcols on update * fix bug and tests
* improve protected branch to add whitelist support (#2451)Lunny Xiao2017-09-141-0/+20
| | | | | | | | | | | | | | | | | | | | * 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
* EnableUnit() -> UnitEnabled() (#2242)Ethan Koenig2017-08-021-2/+2
|
* Improve org error handling (#2117)Antoine GIRARD2017-07-061-1/+1
| | | | | | | | | | * Improve ErrOrgNotExist type Return new error type Use good error check Use new method to check error Update tests * Fix unchanged method name report
* Refactor session close as xorm already does everything needed internally (#2020)Lauris BH2017-06-211-6/+6
|
* Add units to team (#947)Lunny Xiao2017-05-181-0/+22
| | | | | | | | | | | | | | | | | | * 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
* Run "make fmt" with go-1.6 (#1333)Sandro Santilli2017-03-211-1/+1
|
* Refactor and fix incorrect comment (#1247)Ethan Koenig2017-03-151-14/+20
|
* Remove unnecessary loads in org_team (#1090)Ethan Koenig2017-03-011-22/+10
|
* Remove unnecessary loads in org_team (#1035)Ethan Koenig2017-02-241-47/+35
|
* Bug fixes and unit tests for org_team (#1016)Ethan Koenig2017-02-231-21/+15
|
* optimization for team get repos (#953)Lunny Xiao2017-02-161-16/+2
|
* Small opitimization for getUserTeams (#954)Lunny Xiao2017-02-161-21/+6
| | | | | | * Small opitimization for getUserTeams * more compact
* fix xorm NewSession uncorrected usages (#774)Lunny Xiao2017-01-281-1/+1
|
* rename all uID -> userID on models/org_team.goLunny Xiao2016-11-281-26/+26
|
* golint for models/org_team.goLunny Xiao2016-11-281-41/+42
|
* Rewrite XORM queriesThibault Meyer2016-11-101-12/+49
|
* ACCESS_MODE_* -> AccessMode*Sandro Santilli2016-11-071-1/+1
|
* Adds checking of reserved keywords against team names (#22)LefsFlare2016-11-061-1/+17
|
* Refactor User.Id to User.IDUnknwon2016-07-241-4/+4
|
* #1692 add admin APIs to add/remove a user from teamsUnknwon2016-03-251-0/+618