summaryrefslogtreecommitdiffstats
path: root/models/org.go
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-181-0/+36
|
* Feature - #3031 - search for org repos (#5986)Richard Mahn2019-02-081-0/+9
|
* api: Add missing GET teams endpoints (#5382)Harshit Bansal2019-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | * 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.
* Ensure that sessions are passed into queries that could use the database to ↵zeripath2019-01-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prevent deadlocks (#5718) * Fixed deadlock in CreateComment * Fix possible deadlock in UpdateIssueDeadline from createDeadlineComment * Ensure that calls to IsTimeTracker enabled are called within session Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure that calls to reactionList are also called within session Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure all calls in NewPullRequest with the session are called within the session Signed-off-by: Andrew Thornton <art27@cantab.net> * Deal with potential deadlocks in repo Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure that isStaring is checked within our transaction Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix mistake in isOrganizationMember Sorry.
* Fix sqlite deadlock when assigning to a PR (#5640)zeripath2019-01-041-1/+5
| | | | | | | | | | | | * Fix sqlite deadlock when assigning to a PR Fix 5639 Signed-off-by: Andrew Thornton <art27@cantab.net> * More possible deadlocks found and fixed Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix sqlite and mssql lock (#5214)Lunny Xiao2018-10-291-12/+22
|
* Remove check for negative length (#5120)Oleg Kovalov2018-10-201-2/+2
|
* Do not autocreate directory for new user/orgs (#4828) (#4849)SagePtr2018-09-061-4/+0
|
* Fix out-of-transaction query in removeOrgUser (#4521) (#4522)SagePtr2018-07-271-1/+1
|
* Update xorm to latest version and fix correct `user` table referencing in ↵Lauris BH2018-07-201-2/+2
| | | | sql (#4473)
* hide issues from org private repos w/o team assignment (#4034)David Schneiderbauer2018-06-211-1/+16
|
* Fix remove team member issue (#3566)Wendell Sun2018-02-231-8/+14
| | | | | 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-15/+23
|
* Fix ignored errors when checking if organization, team member (#3177)Ethan Koenig2017-12-211-18/+21
|
* fix org owner cannot be removed if there is not in owner team (#3164)Lunny Xiao2017-12-131-1/+6
|
* Hide unactive on explore users and some refactors (#2741)Lunny Xiao2017-10-241-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | * hide unactive on explore users and some refactors * fix test for removed Organizations * fix test for removed Organizations * fix imports * fix logic bug * refactor the toConds * Rename TestOrganizations to TestSearchUsers and add tests for users * fix other tests * fix other tests * fix watchers tests * fix comments and remove unused code
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-051-3/+3
|
* Reduce usage of allcols on update (#2596)Lunny Xiao2017-09-251-1/+1
| | | | | | * reduce usage of allcols on update * fix bug and tests
* Fix lint errors (#2547)Ethan Koenig2017-09-191-5/+1
|
* Fixes 500 error on dashboard when using MSSQL (#2504)bradder5552017-09-151-1/+1
| | | | | | | | | | | | | | MSSQL rejects the query: SELECT "repository"."id" FROM "repository" INNER JOIN "team_repo" ON "team_repo".repo_id="repository".id AND "repository".is_mirror=1 WHERE ( ("repository".owner_id=2 AND "repository".is_private=0) OR team_repo.team_id IN (1) ) GROUP BY "repository".id ORDER BY updated_unix DESC when the order by term (updated_unix) is not included in the group by term.
* improve protected branch to add whitelist support (#2451)Lunny Xiao2017-09-141-0/+5
| | | | | | | | | | | | | | | | | | | | * 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
* Improve org error handling (#2117)Antoine GIRARD2017-07-061-4/+2
| | | | | | | | | | * 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-2/+2
|
* Fix bug in removeOrgRepo (#1858)Ethan Koenig2017-06-021-1/+1
|
* Fix locking bug in removeOrgRepo (#1842)Ethan Koenig2017-06-011-1/+1
|
* Give all units to owner team (#1812)Ethan Koenig2017-05-261-0/+1
|
* fix migrate failed and org dashboard failed on MSSQL database (#1448)Lunny Xiao2017-04-061-4/+21
|
* fix random avatars (#1147)Lunny Xiao2017-03-081-1/+3
|
* fix del org avatar potential delete all avtars (#1120)Lunny Xiao2017-03-061-4/+6
|
* Remove unnecessary loads in org_team (#1035)Ethan Koenig2017-02-241-1/+1
|
* bug fixed on issues and pullsLunny Xiao2017-02-151-1/+0
|
* bug fixed for my repository (#933)Lunny Xiao2017-02-141-2/+6
|
* Small optimization for getTeamIDs (#919)Lunny Xiao2017-02-141-10/+12
| | | | | | * small optimization for getTeamIDs * rename getOrgTeamIDs to getUserTeamIDs and remove orderby
* Fix bug in removeOrgRepoEthan Koenig2017-02-041-2/+20
|
* Cleanup log messagingGabriel Jackson2017-02-021-2/+2
| | | | | | | | | This change corrects a few logging issues: * Standardized formatting errors with '%v'. * Standardized failure warning word usage. * Corrected an instance of using the standard log library when the gitea log library should be used instead.
* Unit tests and bug fix for models/orgEthan Koenig2017-01-271-22/+8
|
* fix xorm NewSession uncorrected usages (#774)Lunny Xiao2017-01-281-4/+6
|
* Fix FIXME and remove superfluous queries in models/org (#749)Ethan Koenig2017-01-251-61/+69
|
* Removes reliance on server specific SQL (#393)btrepp2017-01-141-2/+16
| | | | | | | | Breaks the retrieval of repositories into two queries This fetches the paged ids in one go, then the actual repository information in a second query Some databases do not support SELECT with * when group by is used.
* refactor: Add new deleteOrg func. (#633)Bo-Yi Wu2017-01-111-9/+50
|
* Create missing database indexes (#596)Andrey Nering2017-01-061-1/+1
|
* fix bug #564 (#567)Lunny Xiao2017-01-031-1/+1
|
* Restrict creating organisations by user (#193)Schwobaland2016-12-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | * restrict creating organizations based on right on user * revert bindata.go * reverse vendor lib * revert goimports change * set AllowCreateOrganization default value to true * revert locale * added default value for AllowCreateOrganization * fix typo in migration-comment * fix comment * add coments in migration
* slight optimization for GetUserRepositories (#498)Lunny Xiao2016-12-291-8/+11
|
* fix 500 when delete orgnization and resolved #486Lunny Xiao2016-12-271-6/+7
|
* Added sorting to organizations, repos & users page (#222)Bwko2016-12-241-6/+13
|
* Fix random string generator (#384)Denis Denisov2016-12-201-2/+6
| | | | | | | | | | | * Remove unused custom-alphabet feature of random string generator Fix random string generator Random string generator should return error if it fails to read random data via crypto/rand * Fixes variable (un)initialization mixed assign Update test GetRandomString
* golint for models/org_team.goLunny Xiao2016-11-281-5/+5
|
* Fixes typosBwko2016-11-271-1/+1
|