summaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Fix milestone appliance and permission checks (#4271)Jonas Franz2018-06-191-9/+17
| | | | | | | | | | | * Fix milestone appliance Fix missing permission check Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix comment * Add Gitea copyright line
* fix missing data on redirects (#3975)David Schneiderbauer2018-06-186-86/+90
|
* fix CreateIssueCommentOption reference (#4239)stevegt2018-06-151-1/+1
| | | * fixes a warning remaining from #4010 and #4220
* fix not respecting landing page setting (#4209)David Schneiderbauer2018-06-151-0/+4
| | | | | | | | * fix not respecting landing page setting * fmt * add landing page test
* Fix swagger security parts (#4236)Antoine GIRARD2018-06-121-4/+4
|
* Fix swagger errors (#4220)Antoine GIRARD2018-06-1213-51/+158
| | | | | | | | | | Fix all the resting errors to have a valid swagger file. They are still some warnings but nothing blocking. Doing so I found that some request still misses son parameters for some POST/PUT/PATCH request. This means the a client generated from the swagger file will not work completely. Fix #4088 by activating validation in drone Should fix #4010.
* HTML-escape text READMEs (#4192)nickolas3602018-06-101-2/+6
|
* swagger: add 'required: true' for params in URL (#4097)stevegt2018-06-022-0/+2
| | | | | | | | * Partial fix for #4010 Swagger validation needs 'required: true' for parameters that are in the URL path. Signed-off-by: Steve Traugott <stevegt@t7a.org>
* add simple descriptions for file API responses (#4089)stevegt2018-06-011-3/+6
| | | | | | | | | | * Partial fix for #4010 Swagger needs a description field in each swagger:operation response. Adding minimal text for now on the way to getting swagger validate to pass. Many standard swagger client libraries will not work with gitea until validate passes, so prioritizing that over better descriptions for now. Signed-off-by: Steve Traugott <stevegt@t7a.org>
* add simple descriptions for swagger validate (#4087)stevegt2018-05-317-0/+41
| | | | | | | | | | | * Partial fix for #4010 Swagger needs a comment line above each swagger:response comment -- it uses these to populate the description: fields. Adding minimal text for now on the way to getting swagger validate to pass. Many standard swagger client libraries will not work at all with gitea until validate passes, so prioritizing that over better descriptions for now. Signed-off-by: Steve Traugott <stevegt@t7a.org>
* Added deletion of an empty line at the end of the file (#4050) (#4054)Alexey Terentyev2018-05-291-0/+4
| | | Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
* Fix wiki redirects (#3919)Michael Kuhn2018-05-281-2/+2
| | | | When creating or editing a wiki page, the redirect to the wiki page does not work because the file name is used instead of the page name.
* Make home.tmpl visible with Signin-View enabled (#4040)Fluf2018-05-241-1/+1
| | | Fix #3846
* LDAP Public SSH Keys synchronization (#1844)Magnus Lindvall2018-05-243-20/+21
| | | | | | | | | | | | | | | | | | | * 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-8/+24
| | | | | | | | | | | | | 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 bugs caused by #3929 (#3999)Lunny Xiao2018-05-231-1/+1
|
* Support secure cookie for csrf-token (#3839)Aleksandr Bulyshchenko2018-05-221-0/+1
| | | | | | | | | | | | | | | | | * dep: Update github.com/go-macaron/csrf Update github.com/go-macaron/csrf with dep to revision 503617c6b372 to fix issue of csrf-token security. This update includes following commits: - Add support for the Cookie HttpOnly flag - Support secure mode for csrf cookie Signed-off-by: Aleksandr Bulyshchenko <A.Bulyshchenko@globallogic.com> * routers: set csrf-token security depending on COOKIE_SECURE Signed-off-by: Aleksandr Bulyshchenko <A.Bulyshchenko@globallogic.com>
* remove collaborative repositories from search on user profiles (#3996)David Schneiderbauer2018-05-211-7/+8
| | | | | | * remove collaborative repositories from search on user profiles * rename 'My Repositories' to 'Repositories'
* Fix some webhooks bugs (#3981)Lunny Xiao2018-05-212-4/+4
| | | | | | | | | | | | | | | | | | | | | | * 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-194-6/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Re-enable random avatar feature (#3988)David Schneiderbauer2018-05-191-1/+1
| | | | | | * reenable random avatar feature * replace Size check by Filename check
* Splitted the user settings code into several files to be more maintainable ↵David Schneiderbauer2018-05-1712-842/+950
| | | | | | | | | | | | | | | | | (#3968) * refactor setting router code splitted up one huge router settings file into the smaller files representing the actual page structure * move code to subfolder * rename functions * renamed files * add copyright information
* Add more webhooks support and refactor webhook templates directory (#3929)Lunny Xiao2018-05-164-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Refactor User Settings (#3900)David Schneiderbauer2018-05-154-257/+237
| | | | | | | | | | | | | | | | | | | | | | * moved avatar to profile page * combined password change, email and account deletion into account settings page * combined totp, access tokens, linked accounts and openid into security settings page * move access tokens to applications settings page * small change to restart drone build * fix change avatar url on profile page * redirect old settings urls to new ones * enforce only one autofocus attribute on settings pages * set correct redirect status code * fmt fix
* issue-2768: added new option allow_only_external_registration (#3910)FabioFortini2018-05-132-1/+4
|
* fix blank topic (#3948)Lunny Xiao2018-05-111-1/+5
|
* Multiple assignees (#3705)kolaente2018-05-094-100/+118
|
* fix wrong issue endpoints in swagger doc (#3914)David Schneiderbauer2018-05-082-5/+5
|
* Add option to use paged LDAP search when synchronizing users (#3895)Lauris BH2018-05-051-0/+5
|
* Added user language setting (#3875)kolaente2018-05-052-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-021-1/+7
|
* Issue due date (#3794)kolaente2018-05-014-14/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix path cleanup in multiple places (#3871)Lauris BH2018-05-011-2/+2
|
* API endpoint for testing webhook (#3550)Ethan Koenig2018-04-294-4/+112
| | | | | | * API endpoint for testing webhook * Empty commit to rerun CI
* Store OAuth2 session data in database (#3660)Lauris BH2018-04-291-1/+3
| | | | | | * 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-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* don't reset team/repo count when updating team via API (#3831)Morgan Bazalgette2018-04-291-7/+4
| | | fixes #3600
* Add topic support (#3711)Lunny Xiao2018-04-115-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | * 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 go vet error (#3740)Lunny Xiao2018-03-301-1/+1
|
* refactor: import order. (#3736)Bo-Yi Wu2018-03-2918-31/+36
|
* Correctly check http git access rights for reverse proxy authorized users ↵Lauris BH2018-03-291-20/+20
| | | | (#3721)
* Add repository setting to enable/disable health checks (#3607)Allen Wild2018-03-271-0/+18
| | | | | | | | | | | | | | 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>
* Add protected branch whitelists for merging (#3689)Chri-s2018-03-251-1/+6
| | | | | | | | * Add database migrations for merge whitelist * Add merge whitelist settings for protected branches * Add checks for merge whitelists
* Change protected branch settings title to existing locale entry (#3694)Chri-s2018-03-211-1/+1
|
* Fix style of "In your repositories" when selected (#3699)Alex Ward2018-03-201-1/+1
| | | Signed-off-by: Alex Ward <alxwrd@googlemail.com>
* Global code search support (#3664)Lunny Xiao2018-03-163-1/+119
| | | | | | | | | | | | * 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
* Refactor and simplify redirect to url (#3674)Lauris BH2018-03-154-24/+8
|
* Added checks for protected branches in pull requests (#3544)Chri-s2018-03-131-0/+9
| | | | | | | | | | | | | | | | | | * 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-131-6/+9
| | | | | | * Add label descriptions * Add default descriptions to label template
* Added issue search via api (#3612)kolaente2018-03-071-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Started implementing issue api search * Implemented issue search via api * Added search to swagger.json * Removed todo * fmt * Added comment to generate swagger json via "generate-swagger" * Simplified search * fmt * Removed unessecary comment * Removed unessecary declaration of the issues-variable * Removed unessecary comment * Removed unessecary comment * Added explanation keyword * Simplified check for empty keyword * corrected check if keyword is empty