summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* LDAP Public SSH Keys synchronization (#1844)Magnus Lindvall2018-05-244-15/+181
| | | | | | | | | | | | | | | | | | | * Add LDAP Key Synchronization feature Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Add migration: add login source id column for public_key table * Only update keys if needed * Add function to only list pubkey synchronized from ldap * Only list pub ssh keys synchronized from ldap. Do not sort strings as ExistsInSlice does it. * Only get keys belonging to current login source id * Set default login source id to 0 * Some minor cleanup. Add integration tests (updete dep testify)
* Added repository search ordered by stars or forks. Forks column in admin ↵Alexey Terentyev2018-05-242-2/+6
| | | | | | | | | | | | | repo list. (#3969) * Added repository search order by stars or forks. Added Forks column to admin repository list. Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Renamed search repo template Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
* fix webhook bug of response info is not displayed in UI (#4000)Lunny Xiao2018-05-231-9/+12
|
* fix #4003 (#4004)奶爸2018-05-211-0/+2
| | | Webhook and hook_task not cleaned up when delete repository
* Fix some webhooks bugs (#3981)Lunny Xiao2018-05-2111-37/+267
| | | | | | | | | | | | | | | | | | | | | | * fix some webhooks bugs * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix test * fix clearlabels * fix pullrequest webhook bug fix #3492 * update release webhook description * remove unused code * fix push webhook in pull request * small changes
* Add support for FIDO U2F (#3971)Jonas Franz2018-05-197-0/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for U2F Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add vendor library Add missing translations Signed-off-by: Jonas Franz <info@jonasfranz.software> * Minor improvements Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add U2F support for Firefox, Chrome (Android) by introducing a custom JS library Add U2F error handling Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add U2F login page to OAuth Signed-off-by: Jonas Franz <info@jonasfranz.software> * Move U2F user settings to a separate file Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add unit tests for u2f model Renamed u2f table name Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix problems caused by refactoring Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add U2F documentation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Remove not needed console.log-s Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add default values to app.ini.sample Add FIDO U2F to comparison Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add more webhooks support and refactor webhook templates directory (#3929)Lunny Xiao2018-05-1611-54/+721
| | | | | | | | | | | | | | | | | | | | | | | | | | * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * load attributes when created release * update comparsion doc
* Add LDAP integration tests (#3897)Lauris BH2018-05-111-0/+1
| | | | | | | | | | | | * Add LDAP service for tests * Add LDAP login source and test user sign-in * Add checks to test if user data is correct * Add LDAP user sync test * Add failed user sign-in test
* Fix multiple asssingee table migration (#3931)Lauris BH2018-05-101-37/+39
|
* Multiple assignees (#3705)kolaente2018-05-0922-255/+699
|
* consistent IsOverdue field name capitalization (#3909)Travis Parker2018-05-071-2/+2
| | | | | | | Milestone.IsOverDue vs Issue.IsOverdue, the former was also causing the milestone list page template to fail to render if any milestones have a due date assigned. Signed-off-by: Travis J Parker <travis.parker@gmail.com>
* Added user language setting (#3875)kolaente2018-05-053-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added user language setting * Added translation string for setting * Fixed import order + typo * improved checking if the user has a language saved in the db * The current saved language is now set a default inside the dropdown * fmt * When a user signs in and doesn't have a language saved, the current browser language is saved * updated gitea-sdk * Merge branch 'master' of https://github.com/go-gitea/gitea into save-user-language # Conflicts: # models/migrations/migrations.go # models/migrations/v62.go * Made tests work again * trigger CI * trigger CI * fmt * re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO * re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO * When loggin in, only the language col gets updated instead of everything
* Do not allow to reuse TOTP passcode (#3878)Lauris BH2018-05-023-6/+31
|
* test: reduce testing time. (#3885)Bo-Yi Wu2018-05-021-14/+22
|
* Add "error" as reserved username (#3882)Lauris BH2018-05-021-1/+1
|
* Fix to use only needed columns from tables to get repository git paths (#3870)Lauris BH2018-05-022-4/+48
|
* Issue due date (#3794)kolaente2018-05-013-3/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
* Symlink icons (#1416) (#3826)Tris Forster2018-05-013-3/+20
| | | | | | | | | | | | * Updated vendor code for code.gitea.io/git * Display symlinks correctly for files and directories * Added symlink tests * Applied silverwinds stylesheet patch Signed-off-by: Tris Forster <tris.git@shoddynet.org>
* Fix path cleanup in multiple places (#3871)Lauris BH2018-05-011-1/+1
|
* API endpoint for testing webhook (#3550)Ethan Koenig2018-04-291-0/+1
| | | | | | * API endpoint for testing webhook * Empty commit to rerun CI
* Store OAuth2 session data in database (#3660)Lauris BH2018-04-291-2/+5
| | | | | | * Store OAuth2 session data in database * Rename table to `oauth2_session` and do not skip xormstorage initialization error
* Shows total tracked time in issue and milestone list (#3341)Jonas Franz2018-04-298-16/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Show total tracked time in issue and milestone list Show total tracked time at issue page Signed-off-by: Jonas Franz <info@jonasfranz.software> * Optimizing TotalTimes by using SumInt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fixing wrong total times for milestones caused by a missing JOIN Adding unit tests for total times Signed-off-by: Jonas Franz <info@jonasfranz.software> * Logging error instead of ignoring it Signed-off-by: Jonas Franz <info@jonasfranz.software> * Correcting spelling mistakes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change error message to a short version Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add error handling to TotalTimes Add variable for totalTimes Signed-off-by: Jonas Franz <info@jonasfranz.de> * Introduce TotalTrackedTimes as variable of issue Load TotalTrackedTimes by loading attributes of IssueList Load TotalTrackedTimes by loading attributes of single issue Add Sec2Time as helper to use it in templates Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fixed test + gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Load TotalTrackedTimes via MilestoneList instead of single requests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation for MilestoneList Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation for MilestoneList Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change comment from SQL query to description Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit test by using int64 instead of int Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit test by using int64 instead of int Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if timetracker is enabled Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test by enabling timetracking Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Fix only updated_unix when adding a comment (#3855)kolaente2018-04-291-1/+1
|
* Don't force due date to current time (#3830)Morgan Bazalgette2018-04-231-5/+0
| | | Fixes #3827
* Add topic support (#3711)Lunny Xiao2018-04-115-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | * add topic models and unit tests * fix comments * fix comment * add the UI to show or add topics for a repo * show topics on repositories list * fix test * don't show manage topics link when no permission * use green basic as topic label * fix topic label color * remove trace content * remove debug function
* Fix typo in deleteUser (#3781)Michael Kuhn2018-04-101-1/+1
| | | num_watches was used where num_stars should have been used.
* Add EnableTimetracking option to app settings (#3719)Bwko2018-04-091-0/+10
|
* Enhance healthcheck for database connectivity (#3754)Evan Sherwood2018-04-041-1/+4
| | | | | | | | Modify the call to ping the database to fail gracefully if the database has not yet been configured by the end user, such as after a clean install. This allows /healthcheck to return a 200 with a modified status message instead of causing a PANIC. Signed-off-by: Evan Sherwood <evan@sherwood.io>
* Add Size column to attachment (#3734)Jonas Franz2018-03-313-22/+56
| | | | | | | | | | | | | | | * Add size column to attachment Migrate attachments by calculating file sizes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Calculate attachment size on creation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Log error instead of returning error Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add config option to enable or disable log executed SQL (#3726)Lunny Xiao2018-03-301-1/+1
| | | | | | * add config option to enable or disable log executed SQL * rename ShowSQL to LogSQL
* fix go vet error (#3740)Lunny Xiao2018-03-301-8/+8
|
* Add repository setting to enable/disable health checks (#3607)Allen Wild2018-03-273-2/+27
| | | | | | | | | | | | | | New Feature: * Repository struct field for IsFsckEnabled (default true of course) * Admin Settings section on repo options page, accessible only by admin users Possible Enhancements: * There's no way to force running health checks on all repos regardless of their IsFsckEnabled setting. This would be useful if there were an admin API or dashboard button to run fsck immediately. Issue: https://github.com/go-gitea/gitea/issues/1712 Signed-off-by: Allen Wild <allenwild93@gmail.com>
* Set default branchname on first push (#3715)Bwko2018-03-251-1/+5
|
* Add protected branch whitelists for merging (#3689)Chri-s2018-03-254-36/+149
| | | | | | | | * Add database migrations for merge whitelist * Add merge whitelist settings for protected branches * Add checks for merge whitelists
* Improve release page UI (#3693)Jonas Franz2018-03-191-0/+11
| | | | | | | | | | * Improve release page ui by adding size Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation to a.MustSize() Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Global code search support (#3664)Lunny Xiao2018-03-162-0/+31
| | | | | | | | | | | | * add global code search on explore * fix bug when no anyone public repos * change the icon * fix typo and add UnitTypeCode check for login non-admin user * fix ui description when no match
* Added checks for protected branches in pull requests (#3544)Chri-s2018-03-132-0/+44
| | | | | | | | | | | | | | | | | | * Added checks for protected branches in pull requests Signed-off-by: Christian Wulff <NChris@posteo.net> * Moved check for protected branch into new function CheckUserAllowedToMerge Signed-off-by: Christian Wulff <NChris@posteo.net> * Removed merge conflict lines from last commit Signed-off-by: Christian Wulff <NChris@posteo.net> * Explicit check for error type in ViewIssue Signed-off-by: Christian Wulff <NChris@posteo.net>
* Add label descriptions (#3662)Lauris BH2018-03-133-5/+38
| | | | | | * Add label descriptions * Add default descriptions to label template
* Fix MySQL and PostgreSQL column drop SQL (#3649)Lauris BH2018-03-091-1/+1
|
* Fix column removal in MSSQL (#3638)Lauris BH2018-03-072-21/+61
| | | | | | | | * Fix column removal in MSSQL * Use xorm session in MSSQL drop column operations * Add transaction as MSSQL alter table is transactional
* Add Attachment API (#3478)Jonas Franz2018-03-063-3/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
* Don't write to log NoCommitterAccount (#3621)Morgan Bazalgette2018-03-041-1/+5
| | | | | | | | | | | * Don't write to log NoCommitterAccount It's way too verbose, and the information is also printed to the user already. Fixes #3602. * ignore err only if it's a ErrUserNotExist * Replace with IsErrUserNotExist
* fix: Add feed for organization (#3594)Bo-Yi Wu2018-03-032-0/+16
| | | | | | | | | | | | * feat: Add feed for organization * fix: testing * fix: testing * fix: testing * fix: testing
* Add admin dashboard option to run health checks (#3606)Allen Wild2018-03-021-0/+2
| | | | | There's one for git gc, why not git fsck too? Also add a couple more trace logs to GitFsck to see progress
* Fix the protected branch panic issue (#3567)Wendell Sun2018-02-231-0/+4
|
* Fix remove team member issue (#3566)Wendell Sun2018-02-232-9/+27
| | | | | Put sess.Commit() out of the RemoveOrgUser function Add an empty line to separate import packages
* Fix query protected branch bug (#3563)Wendell Sun2018-02-221-2/+1
| | | Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
* fix: if Mirrors repo no content is fetched, updated time should not b… (#3551)Bo-Yi Wu2018-02-221-1/+15
| | | | | | | | | | | | * fix: if Mirrors repo no content is fetched, updated time should not be changed * fix: sync update time from mirror repo. * fix: one single session. * update comment. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* refactor: reduce sql query in retrieveFeeds (#3547)Bo-Yi Wu2018-02-212-1/+108
|
* Use unique temp dirs in unit tests (#3494)Ethan Koenig2018-02-211-8/+25
| | | | | | | | * Use unique temp dirs in unit tests * Remove temp dirs after tests run * os.RemoveAll -> removeAllWithRetry