summaryrefslogtreecommitdiffstats
path: root/models/models.go
Commit message (Collapse)AuthorAgeFilesLines
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-051-1/+1
|
* Use created & updated instead BeforeInsert & BeforeUpdate (#2482)Lunny Xiao2017-09-131-0/+1
| | | | | | | | | | | | * use created & updated instead BeforeInsert & BeforeUpdate * fix vendor checksum * only show generated SQL when development mode * remove extra update column updated_unix * remove trace config
* Feature: Timetracking (#2211)Jonas Franz2017-09-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
* update latest xorm version to vendor (#2353)Lunny Xiao2017-08-221-1/+1
|
* Fix git hooks update to receive required arguments. Fixes #2090 (#2095)Lauris BH2017-07-021-3/+2
| | | * Changed migration calling so that migrations can use models package
* Refactor session close as xorm already does everything needed internally (#2020)Lauris BH2017-06-211-7/+0
|
* SQLite has a query timeout. Hopefully fixes most 'database locked' errors ↵Kim "BKC" Carlbäcker2017-06-151-1/+3
| | | | | | (#1961) * SQLite has a query timeout. Fixes 'database locked' errors
* Status-API (#1332)Kim "BKC" Carlbäcker2017-04-211-0/+1
|
* Create issue_watch tableAndrey Nering2017-03-291-0/+1
|
* Login via OpenID-2.0 (#618)Sandro Santilli2017-03-171-0/+1
|
* Implement GPG api (#710)Antoine GIRARD2017-03-161-0/+1
| | | | | | | | | | * Implement GPG API * Better handle error * Apply review recommendation + simplify database operations * Remove useless comments
* fix install submit crash caused by xorm log (#1119)Lunny Xiao2017-03-061-2/+1
|
* Move push update to post-receive and protected branch check to pre-receive ↵Lunny Xiao2017-02-251-2/+0
| | | | | | | | | | | | (#1030) * move all push update to git hook post-receive and protected branch check to git hook pre-receive * add SSH_ORIGINAL_COMMAND check back * remove all unused codes * fix the import
* added missing new struct sync (#1021)Lunny Xiao2017-02-231-0/+2
|
* Make Xorm log configurable (#174)Lunny Xiao2017-02-201-12/+5
| | | | | | | | | | * make xorm log configable * bug fixed for other sub commands except web * rebase and fix xorm log * bug fix for TrimSpace
* Small optimization for getTeamIDs (#919)Lunny Xiao2017-02-141-0/+1
| | | | | | * small optimization for getTeamIDs * rename getOrgTeamIDs to getUserTeamIDs and remove orderby
* small optimization for get issue labelsLunny Xiao2017-02-121-0/+1
|
* Consistency checks for unit tests (#853)Ethan Koenig2017-02-071-0/+1
|
* Redirects for renamed repos (#807)Ethan Koenig2017-02-051-0/+1
| | | | | | * Redirects for renamed repos * Remove unused phrase from locales
* Fix bug in removeOrgRepoEthan Koenig2017-02-041-0/+2
|
* Add units concept for modulable functions of a repository (#742)Lunny Xiao2017-02-041-0/+1
| | | | | | | | | | | | | | | | * Add units concept for modulable functions of a repository * remove unused comment codes & fix lints and tests * remove unused comment codes * use struct config instead of map * fix lint * rm wrong files * fix tests
* Cleanup log messagingGabriel Jackson2017-02-021-5/+5
| | | | | | | | | 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.
* Search bar for issues/pulls (#530)Ethan Koenig2017-01-251-0/+4
|
* Two factor authentication support (#630)Andrew2017-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * Initial commit for 2FA support Signed-off-by: Andrew <write@imaginarycode.com> * Add vendored files * Add missing depends * A few clean ups * Added improvements, proper encryption * Better encryption key * Simplify "key" generation * Make 2FA enrollment page more robust * Fix typo * Rename twofa/2FA to TwoFactor * UNIQUE INDEX -> UNIQUE
* Update xorm and dependencies vendor for feature to dump to other database (#565)Lunny Xiao2017-01-031-3/+10
| | | | | | * update xorm and dependencies vendor for feature to dump to other database * fix golint
* fix gofmt errorBo-Yi Wu2016-12-301-9/+9
| | | | Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Notification - Step 1 (#523)Andrey Nering2016-12-311-9/+35
| | | | | | | | * Notification - Step 1 * Add copyright headers * Cache issue and repository on notification model
* Git LFS support v2 (#122)Fabian Zaremba2016-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Import github.com/git-lfs/lfs-test-server as lfs module base Imported commit is 3968aac269a77b73924649b9412ae03f7ccd3198 Removed: Dockerfile CONTRIBUTING.md mgmt* script/ vendor/ kvlogger.go .dockerignore .gitignore README.md * Remove config, add JWT support from github.com/mgit-at/lfs-test-server Imported commit f0cdcc5a01599c5a955dc1bbf683bb4acecdba83 * Add LFS settings * Add LFS meta object model * Add LFS routes and initialization * Import github.com/dgrijalva/jwt-go into vendor/ * Adapt LFS module: handlers, routing, meta store * Move LFS routes to /user/repo/info/lfs/* * Add request header checks to LFS BatchHandler / PostHandler * Implement LFS basic authentication * Rework JWT secret generation / load * Implement LFS SSH token authentication with JWT Specification: https://github.com/github/git-lfs/tree/master/docs/api * Integrate LFS settings into install process * Remove LFS objects when repository is deleted Only removes objects from content store when deleted repo is the only referencing repository * Make LFS module stateless Fixes bug where LFS would not work after installation without restarting Gitea * Change 500 'Internal Server Error' to 400 'Bad Request' * Change sql query to xorm call * Remove unneeded type from LFS module * Change internal imports to code.gitea.io/gitea/ * Add Gitea authors copyright * Change basic auth realm to "gitea-lfs" * Add unique indexes to LFS model * Use xorm count function in LFS check on repository delete * Return io.ReadCloser from content store and close after usage * Add LFS info to runWeb() * Export LFS content store base path * LFS file download from UI * Work around git-lfs client issue with unauthenticated requests Returning a dummy Authorization header for unauthenticated requests lets git-lfs client skip asking for auth credentials See: https://github.com/github/git-lfs/issues/1088 * Fix unauthenticated UI downloads from public repositories * Authentication check order, Finish LFS file view logic * Ignore LFS hooks if installed for current OS user Fixes Gitea UI actions for repositories tracking LFS files. Checks for minimum needed git version by parsing the semantic version string. * Hide LFS metafile diff from commit view, marking as binary * Show LFS notice if file in commit view is tracked * Add notbefore/nbf JWT claim * Correct lint suggestions - comments for structs and functions - Add comments to LFS model - Function comment for GetRandomBytesAsBase64 - LFS server function comments and lint variable suggestion * Move secret generation code out of conditional Ensures no LFS code may run with an empty secret * Do not hand out JWT tokens if LFS server support is disabled
* Enables mssql support (#383)btrepp2016-12-241-0/+22
| | | | | | | | | | | | | | | | | | | * Enables mssql support Port of dlobs work in gogs. Enables options in index.js Enables MSSQL as a database option in go. Sets ID to 0 on initial migration. Required for MSSQL insert statements. Signed-off-by: Beau Trepp <beautrepp@gmail.com> * Vendors in denisenkom/go-mssqldb Includes golang.org/x/crypto/md4 as this is required by go-msssqldb Signed-off-by: Beau Trepp <beautrepp@gmail.com>
* Catch os... errorsBwko2016-12-021-1/+4
|
* golint fixed for models/models.go (#284)Lunny Xiao2016-11-281-3/+3
|
* Lint models/org.go & models.goBwko2016-11-261-5/+21
|
* test database is connect OK after db config initialized (#239)Lunny Xiao2016-11-241-0/+4
|
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-2/+2
| | | | | | | - Update import paths from github.com/go-gitea to code.gitea.io - Fix import path for travis See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
* use x.SQL instead of x.SqlLunny Xiao2016-11-101-1/+1
|
* Replace Gogs to Gitea in installation optionsJoubert RedRat2016-11-071-1/+1
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-2/+2
|
* Changed interface (#3685)LefsFlare2016-09-221-1/+1
|
* Web editor: support upload filesUnknwon2016-08-301-1/+1
|
* models/issue: improve quality and performance of NewIssue functionUnknwon2016-08-151-0/+1
|
* Code clean upUnknwon2016-08-121-9/+1
|
* #3442 add test suitesUnknwon2016-08-121-0/+15
|
* Fix #3437: Cannot connect to PostgreSQL via IPv6 address (#3442)Thibault Meyer2016-08-121-6/+6
| | | | | | | | * Change PostgreSQL connstring parsing to handle IPv6 * Fix used variable * Remove redundant code + use variable
* models: rename EnableTidb to EnableTiDBUnknwon2016-08-111-1/+1
|
* #3013 support connect PostgreSQL via unix socketUnknwon2016-08-111-12/+19
|
* #3281 fix x.Iterate returns nothing inside session scope with SQLite3Unknwon2016-07-261-1/+2
|
* #1384 add pagination for repositoriesUnknwon2016-07-241-3/+3
|
* getEngine() not handles DB parameters (#2972) (#2974)Tom2016-07-021-6/+10
|
* #2302 Replace time.Time with Unix Timestamp (int64)Unknwon2016-03-091-24/+0
|
* fix dependency broken because xorm's API changedLunny Xiao2016-02-161-6/+1
|