Commit Graph

1883 Commits

Author SHA1 Message Date
GiteaBot f0ed71251e [skip ci] Updated translations via Crowdin 2020-11-15 16:29:08 +00:00
Chris Shyi d025d84d91
Add email validity check (#13475)
* Improve error feedback for duplicate deploy keys

Instead of a generic HTTP 500 error page, a flash message is rendered
with the deploy key page template so inform the user that a key with the
intended title already exists.

* API returns 422 error when key with name exists

* Add email validity checking

Add email validity checking for the following routes:
[Web interface]
1. User registration
2. User creation by admin
3. Adding an email through user settings
[API]
1. POST /admin/users
2. PATCH /admin/users/:username
3. POST /user/emails

* Add further tests

* Add signup email tests

* Add email validity check for linking existing account

* Address PR comments

* Remove unneeded DB session

* Move email check to updateUser

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-14 11:53:43 -05:00
GiteaBot d0a676c8ff [skip ci] Updated translations via Crowdin 2020-11-13 17:24:39 +00:00
GiteaBot ee7133d135 [skip ci] Updated translations via Crowdin 2020-11-12 16:00:39 +00:00
GiteaBot 6838bacc4c [skip ci] Updated translations via Crowdin 2020-11-11 20:35:20 +00:00
GiteaBot 9155f13bf8 [skip ci] Updated translations via Crowdin 2020-11-10 11:45:51 +00:00
GiteaBot ffa712e783 [skip ci] Updated translations via Crowdin 2020-11-09 18:22:53 +00:00
GiteaBot ef2ffc6aed [skip ci] Updated translations via Crowdin 2020-11-09 06:16:15 +00:00
GiteaBot 004b40dad0 [skip ci] Updated translations via Crowdin 2020-11-08 18:03:03 +00:00
zeripath c05a8abc76
Multiple GitGraph improvements: Exclude PR heads, Add branch/PR links, Show only certain branches, (#12766)
* Multiple GitGraph improvements.

Add backend support for excluding PRs, selecting branches and files.

Fix #10327

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Only show refs in dropdown we display on the graph

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* use flexbox for ui header

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Move Hide Pull Request button to the dropdown

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add SHA and user pictures

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test 2

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fixes

* async

* more tweaks

* use tabs in tmpl

Signed-off-by: Andrew Thornton <art27@cantab.net>

* remove commented thing

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix linting

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update web_src/js/features/gitgraph.js

Co-authored-by: silverwind <me@silverwind.io>

* graph tweaks

* more tweaks

* add title

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix loading indicator z-index and position

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-08 12:21:54 -05:00
GiteaBot d4e0b28655 [skip ci] Updated translations via Crowdin 2020-11-08 16:30:44 +00:00
GiteaBot ed47da2e29 [skip ci] Updated translations via Crowdin 2020-11-07 12:55:59 +00:00
GiteaBot 3c7908b51c [skip ci] Updated translations via Crowdin 2020-11-05 19:35:13 +00:00
GiteaBot 5b636bdec7 [skip ci] Updated translations via Crowdin 2020-11-05 14:21:49 +00:00
John Olheiser 7c68ac8f7d
Tags cleanup (#13428)
* Tags cleanup

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-11-05 08:20:42 -06:00
GiteaBot dd882f6a69 [skip ci] Updated translations via Crowdin 2020-11-04 22:56:17 +00:00
GiteaBot 59c3cf6388 [skip ci] Updated translations via Crowdin 2020-11-04 07:15:15 +00:00
GiteaBot 951a333733 [skip ci] Updated translations via Crowdin 2020-11-03 15:49:01 +00:00
GiteaBot fa8492fb70 [skip ci] Updated translations via Crowdin 2020-11-03 11:36:19 +00:00
GiteaBot be880d4063 [skip ci] Updated translations via Crowdin 2020-11-03 06:05:23 +00:00
a1012112796 b687707014
Add the tag list page to the release page (#12096)
* Add the tag list page to the release page

* Add the tags list view
* Add the delete tag way on ui
* Not delete tag and clear message when delete a release

Signed-off-by: a1012112796 <1012112796@qq.com>

* Apply suggestions from code review

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>

* fix ui

* Add to header

* ui

* permission

* ui

* Update options/locale/locale_en-US.ini

Co-authored-by: Lauris BH <lauris@nix.lv>

* tweaks

* monospace commit hashes

* Add read permission check

* fix permission

* fix nit

* Update web_src/less/_base.less

Co-authored-by: silverwind <me@silverwind.io>

* ui fixes

* title tweaks

* fix lint

* fix test

* fix test and some ui nits

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
2020-11-02 18:10:22 -05:00
GiteaBot fc40cdfa89 [skip ci] Updated translations via Crowdin 2020-11-02 15:59:27 +00:00
GiteaBot 8176ba6573 [skip ci] Updated translations via Crowdin 2020-11-01 20:05:29 +00:00
GiteaBot e7750e0f6a [skip ci] Updated translations via Crowdin 2020-10-31 17:25:33 +00:00
GiteaBot d01d39d6cf [skip ci] Updated translations via Crowdin 2020-10-31 12:18:38 +00:00
GiteaBot e16a5bb634 [skip ci] Updated translations via Crowdin 2020-10-30 22:00:02 +00:00
GiteaBot 764237e78c [skip ci] Updated translations via Crowdin 2020-10-30 16:28:07 +00:00
GiteaBot 643a0a691a [skip ci] Updated translations via Crowdin 2020-10-29 21:42:52 +00:00
GiteaBot bb89fa1aaa [skip ci] Updated translations via Crowdin 2020-10-27 20:07:43 +00:00
GiteaBot afe9d79104 [skip ci] Updated translations via Crowdin 2020-10-26 16:43:30 +00:00
GiteaBot dbebc6b0e3 [skip ci] Updated translations via Crowdin 2020-10-26 09:06:29 +00:00
Pedro Alves c40df54e28
Group Label Changed Comments in timeline (#13304)
* Create function to group label comments

* Combine multiple label additions into one

* Group removed and added labels in the same comment

* Fix indentation on comments.tmpl

Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
2020-10-25 17:49:48 -04:00
GiteaBot 756c090dbe [skip ci] Updated translations via Crowdin 2020-10-25 20:57:54 +00:00
Divyam Bhasin 7974b34183
#12897 - add mastodon provider (#13293)
* added mastodon provider to oauth code

* changed go.mod and vendor/modules.txt to add updated goth

* vendored mastodon and new goth

* committing result of go mod tidy && go mod vendor

* added pic and mastodon to oauth models

* handled instance url

* applied lafriks suggestion

* Update web_src/js/index.js

Co-authored-by: techknowlogick <matti@mdranta.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <matti@mdranta.net>
2020-10-25 14:21:49 -04:00
GiteaBot f565cf5dcf [skip ci] Updated translations via Crowdin 2020-10-25 17:20:28 +00:00
GiteaBot 65dc4d0410 [skip ci] Updated translations via Crowdin 2020-10-24 17:50:51 +00:00
GiteaBot eef5871042 [skip ci] Updated translations via Crowdin 2020-10-24 16:49:12 +00:00
GiteaBot 2fa4c4ad3a [skip ci] Updated translations via Crowdin 2020-10-24 11:55:43 +00:00
zeripath 0800c7e91d
Rearrange the order of the merged by etc. in locale (#13284)
Fix #13260

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-10-23 23:34:21 -04:00
GiteaBot e4d9533543 [skip ci] Updated translations via Crowdin 2020-10-23 16:00:48 +00:00
GiteaBot bfc553164a [skip ci] Updated translations via Crowdin 2020-10-23 10:12:50 +00:00
GiteaBot 9912a11b33 [skip ci] Updated translations via Crowdin 2020-10-22 19:49:54 +00:00
GiteaBot 1989fe2ddc [skip ci] Updated translations via Crowdin 2020-10-22 18:03:41 +00:00
GiteaBot e9869f59af [skip ci] Updated translations via Crowdin 2020-10-22 17:05:26 +00:00
GiteaBot 178861952e [skip ci] Updated translations via Crowdin 2020-10-22 15:46:58 +00:00
GiteaBot e964c6ec18 [skip ci] Updated translations via Crowdin 2020-10-22 05:47:21 +00:00
GiteaBot a06ea38207 [skip ci] Updated translations via Crowdin 2020-10-21 20:00:31 +00:00
GiteaBot f0fe5683fe [skip ci] Updated translations via Crowdin 2020-10-21 15:43:44 +00:00
GiteaBot 53359b1861 [skip ci] Updated translations via Crowdin 2020-10-21 11:03:31 +00:00
zeripath 965861043a
Return the full rejection message and errors in flash errors (#13221)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-10-20 19:50:10 -04:00
GiteaBot 70cb9e38e2 [skip ci] Updated translations via Crowdin 2020-10-20 18:19:29 +00:00
GiteaBot b50448b286 [skip ci] Updated translations via Crowdin 2020-10-20 12:54:03 +00:00
GiteaBot d67172b136 [skip ci] Updated translations via Crowdin 2020-10-19 19:26:52 +00:00
GiteaBot 40779938a9 [skip ci] Updated translations via Crowdin 2020-10-18 17:52:36 +00:00
GiteaBot 27687fa4f0 [skip ci] Updated translations via Crowdin 2020-10-18 14:11:20 +00:00
GiteaBot 131278ff22 [skip ci] Updated translations via Crowdin 2020-10-16 17:14:34 +00:00
GiteaBot bcf45bb162 [skip ci] Updated translations via Crowdin 2020-10-15 18:31:29 +00:00
GiteaBot 25f7e1c50b [skip ci] Updated translations via Crowdin 2020-10-15 09:49:02 +00:00
GiteaBot deb0333c96 [skip ci] Updated translations via Crowdin 2020-10-15 08:18:52 +00:00
Iván Valdés 05c7e58742
Show outdated comments in pull request (#13148)
Co-authored-by: zeripath <art27@cantab.net>
2020-10-15 11:17:48 +03:00
GiteaBot bfb3333528 [skip ci] Updated translations via Crowdin 2020-10-15 04:15:26 +00:00
GiteaBot e4a3785218 [skip ci] Updated translations via Crowdin 2020-10-14 21:45:21 +00:00
GiteaBot 07c9f6dca4 [skip ci] Updated translations via Crowdin 2020-10-14 18:49:08 +00:00
GiteaBot 8fa74045c4 [skip ci] Updated translations via Crowdin 2020-10-14 17:02:15 +00:00
GiteaBot 36e41d4764 [skip ci] Updated translations via Crowdin 2020-10-14 13:09:05 +00:00
GiteaBot 93f7525061 [skip ci] Updated translations via Crowdin 2020-10-14 12:12:40 +00:00
GiteaBot e70df67d47 [skip ci] Updated translations via Crowdin 2020-10-14 11:18:41 +00:00
Lauris BH a2a05d164b
Fix punctuation in trust model description (#13140) 2020-10-14 14:17:40 +03:00
GiteaBot aa73b7b7e5 [skip ci] Updated translations via Crowdin 2020-10-14 04:07:05 +00:00
6543 49b1948cb1
Gitea 2 Gitea migration (#12657)
* first draft

* update gitea sdk to 9e280adb4da

* adapt feat of updated sdk

* releases now works

* break the Reactions loop

* use convertGiteaLabel

* fix endless loop because paggination is not supported there !!!

* rename gitea local uploader files

* pagination can bite you in the ass

* Version Checks

* lint

* docs

* rename gitea sdk import to miss future conficts

* go-swagger: dont scan the sdk structs

* make sure gitea can shutdown gracefully

* make GetPullRequests and GetIssues similar

* rm useles

* Add Test: started ...

* ... add tests ...

* Add tests and Fixing things

* Workaround missing SHA

* Adapt: Ensure that all migration requests are cancellable
(714ab71ddc)

* LINT: fix misspells in test set

* adapt ListMergeRequestAwardEmoji

* update sdk

* Return error when creating giteadownloader failed

* update sdk

* adapt new sdk

* adopt new features

* check version before err

* adapt: 'migrate service type switch page'

* optimize

* Fix DefaultBranch

* impruve

* handle subPath

* fix test

* Fix ReviewCommentPosition

* test GetReviews

* add DefaultBranch int test set

* rm unused

* Update SDK to v0.13.0

* addopt sdk changes

* found better link

* format template

* Update Docs

* Update Gitea SDK (v0.13.1)
2020-10-14 07:06:00 +03:00
赵智超 dfa7291f8f
[Enhancement] Allow admin to merge pr with protected file changes (#12078)
* [Enhancement] Allow admin to merge pr with protected file changes

As tilte, show protected message in diff page and merge box.

Signed-off-by: a1012112796 <1012112796@qq.com>

* remove unused ver

* Update options/locale/locale_en-US.ini

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>

* Add TrN

* Apply suggestions from code review

* fix lint

* Update options/locale/locale_en-US.ini

Co-authored-by: zeripath <art27@cantab.net>

* Apply suggestions from code review

* move pr proteced files check to TestPatch
* Call TestPatch when protected branches settings changed

* Apply review suggestion @CirnoT

* move to service @lunny

* slightly restructure routers/private/hook.go

Adds a lot of comments and simplifies the logic

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* skip duplicate protected files check

* fix check logic

* slight refactor of TestPatch

Signed-off-by: Andrew Thornton <art27@cantab.net>

* When checking for protected files changes in TestPatch use the temporary repository

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix introduced issue with hook

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove the check on PR index being greater than 0 as it unnecessary

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-13 14:50:57 -04:00
GiteaBot da32d0e72a [skip ci] Updated translations via Crowdin 2020-10-13 16:25:13 +00:00
GiteaBot b546eda7a8 [skip ci] Updated translations via Crowdin 2020-10-12 18:45:03 +00:00
GiteaBot e35f7e81ae [skip ci] Updated translations via Crowdin 2020-10-11 18:52:13 +00:00
Wim 9066d09c57
Add ssh certificate support (#12281)
* Add ssh certificate support

* Add ssh certificate support to builtin ssh

* Write trusted-user-ca-keys.pem based on configuration

* Update app.example.ini

* Update templates/user/settings/keys_principal.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Remove unused locale string

* Update options/locale/locale_en-US.ini

Co-authored-by: silverwind <me@silverwind.io>

* Update options/locale/locale_en-US.ini

Co-authored-by: silverwind <me@silverwind.io>

* Update models/ssh_key.go

Co-authored-by: silverwind <me@silverwind.io>

* Add missing creation of SSH.Rootpath

* Update cheatsheet, example and locale strings

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>

* Update models/ssh_key.go

* Optimizations based on feedback

* Validate CA keys for external sshd

* Add filename option and change default filename

Add a SSH_TRUSTED_USER_CA_KEYS_FILENAME option which default is
RUN_USER/.ssh/gitea-trusted-user-ca-keys.pem

Do not write a file when SSH_TRUSTED_USER_CA_KEYS is empty.

Add some more documentation.

* Remove unneeded principalkey functions

* Add blank line

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>

* Add SSH_AUTHORIZED_PRINCIPALS_ALLOW option

This adds a SSH_AUTHORIZED_PRINCIPALS_ALLOW which is default
email,username this means that users only can add the principals
that match their email or username.

To allow anything the admin need to set the option anything.

This allows for a safe default in gitea which protects against malicious
users using other user's prinicipals. (before that user could set it).

This commit also has some small other fixes from the last code review.

* Rewrite principal keys file on user deletion

* Use correct rewrite method

* Set correct AuthorizedPrincipalsBackup default setting

* Rewrite principalsfile when adding principals

* Add update authorized_principals option to admin dashboard

* Handle non-primary emails

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add the command actually to the dashboard template

* Update models/ssh_key.go

Co-authored-by: silverwind <me@silverwind.io>

* By default do not show principal options unless there are CA keys set or they are explicitly set

Signed-off-by: Andrew Thornton <art27@cantab.net>

* allow settings when enabled

* Fix typos in TrustedUserCAKeys path

* Allow every CASignatureAlgorithms algorithm

As this depends on the content of TrustedUserCAKeys we should allow all
signature algorithms as admins can choose the specific algorithm on their
signing CA

* Update models/ssh_key.go

Co-authored-by: Lauris BH <lauris@nix.lv>

* Fix linting issue

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-10 20:38:09 -04:00
GiteaBot 529c5ffe12 [skip ci] Updated translations via Crowdin 2020-10-08 15:51:23 +00:00
GiteaBot 4df6807b81 [skip ci] Updated translations via Crowdin 2020-10-07 18:25:19 +00:00
GiteaBot e0b7727804 [skip ci] Updated translations via Crowdin 2020-10-07 09:56:17 +00:00
Niklas Goerke 8fe8ab5cbf
Mitigate Security vulnerability in the git hook feature (#13058)
* Extend git hook warning in the UI.

Git hooks are a dangerous feature, administrators should be warned before giving
the git hook privilege to users.

* Disable Git hooks by default and add warning.

Git hooks are a dangerous features (see warning text) that should only
be enabled if the administrator was informed about the risk involved.

Co-authored-by: Niklas Goerke <goerke@fzi.de>
2020-10-07 12:55:13 +03:00
GiteaBot f5436b4a67 [skip ci] Updated translations via Crowdin 2020-10-06 16:17:17 +00:00
GiteaBot a23c128ba6 [skip ci] Updated translations via Crowdin 2020-10-06 07:24:15 +00:00
Spencer Taylor 6eea301829
Adding visual cue for "Limited" & "Private" organizations. (#13040)
* Adding visual cue for "Limited" & "Private" organizations.

* Moving org visibility CSS styles to .less files.

Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-06 02:25:43 -04:00
GiteaBot 91118bc73d [skip ci] Updated translations via Crowdin 2020-10-05 22:47:15 +00:00
GiteaBot 10e04da28c [skip ci] Updated translations via Crowdin 2020-10-04 17:13:45 +00:00
GiteaBot 86b8c81240 [skip ci] Updated translations via Crowdin 2020-10-02 09:38:47 +00:00
GiteaBot 1d2553abbf [skip ci] Updated translations via Crowdin 2020-10-01 12:50:55 +00:00
zeripath c6da033656
Copy missing things from app.example.ini to Cheat Sheet (#12988)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-10-01 07:57:57 +01:00
GiteaBot 992f387139 [skip ci] Updated translations via Crowdin 2020-10-01 05:55:40 +00:00
GiteaBot 551473b294 [skip ci] Updated translations via Crowdin 2020-09-30 21:00:33 +00:00
GiteaBot 7670a9db10 [skip ci] Updated translations via Crowdin 2020-09-30 16:17:15 +00:00
GiteaBot 615e784150 [skip ci] Updated translations via Crowdin 2020-09-30 12:28:46 +00:00
GiteaBot 9b6361f8a0 [skip ci] Updated translations via Crowdin 2020-09-29 19:27:47 +00:00
GiteaBot b606f13365 [skip ci] Updated translations via Crowdin 2020-09-28 19:01:59 +00:00
GiteaBot f404bdde9b [skip ci] Updated translations via Crowdin 2020-09-27 19:21:50 +00:00
GiteaBot 82179a6e81 [skip ci] Updated translations via Crowdin 2020-09-27 02:11:47 +00:00
GiteaBot b49ebc2ba8 [skip ci] Updated translations via Crowdin 2020-09-26 17:57:16 +00:00
GiteaBot 274430f40b [skip ci] Updated translations via Crowdin 2020-09-25 08:59:15 +00:00
zeripath 7a7f56044a
Adopt repositories (#12920)
* Don't automatically delete repository files if they are present

Prior to this PR Gitea would delete any repository files if they are
present during creation or migration. This can in certain circumstances
lead to data-loss and is slightly unpleasant.

This PR provides a mechanism for Gitea to adopt repositories on creation
and otherwise requires an explicit flag for deletion.

PushCreate is slightly different - the create will cause adoption if
that is allowed otherwise it will delete the data if that is allowed.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix tests and migrate overwrite

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @lunny

Only offer to adopt or overwrite if the user can do that.

Allow the site administrator to adopt or overwrite in all
circumstances

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Use setting.Repository.DefaultBranch for the default branch

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Always set setting.Repository.DefaultBranch

Signed-off-by: Andrew Thornton <art27@cantab.net>

* update swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>

* update templates

Signed-off-by: Andrew Thornton <art27@cantab.net>

* ensure repo closed

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Rewrite of adoption as per @6543 and @lunny

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review

* update swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>

* missing not

Signed-off-by: Andrew Thornton <art27@cantab.net>

* add modals and flash reporting

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Make the unadopted page searchable

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add API

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Handle empty and non-master branched repositories

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* remove commented out code

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-25 07:09:23 +03:00
GiteaBot b5109272db [skip ci] Updated translations via Crowdin 2020-09-24 22:38:04 +00:00
GiteaBot 01ad714715 [skip ci] Updated translations via Crowdin 2020-09-23 20:26:51 +00:00
GiteaBot f215e015df [skip ci] Updated translations via Crowdin 2020-09-22 17:03:23 +00:00
GiteaBot 060d46dd25 [skip ci] Updated translations via Crowdin 2020-09-21 14:37:57 +00:00
GiteaBot 3f9eb93cc6 [skip ci] Updated translations via Crowdin 2020-09-20 21:56:51 +00:00
GiteaBot 23f064e813 [skip ci] Updated translations via Crowdin 2020-09-20 20:21:12 +00:00
GiteaBot e7ffc67ad5 [skip ci] Updated translations via Crowdin 2020-09-20 17:56:20 +00:00
GiteaBot 7e5499575b [skip ci] Updated translations via Crowdin 2020-09-19 23:22:29 +00:00
GiteaBot 355788db46 [skip ci] Updated translations via Crowdin 2020-09-19 16:45:53 +00:00
zeripath 4979f15c3f
Add configurable Trust Models (#11712)
* Add configurable Trust Models

Gitea's default signature verification model differs from GitHub. GitHub
uses signatures to verify that the committer is who they say they are -
meaning that when GitHub makes a signed commit it must be the committer.
The GitHub model prevents re-publishing of commits after revocation of a
key and prevents re-signing of other people's commits to create a
completely trusted repository signed by one key or a set of trusted
keys.

The default behaviour of Gitea in contrast is to always display the
avatar and information related to a signature. This allows signatures to
be decoupled from the committer. That being said, allowing arbitary
users to present other peoples commits as theirs is not necessarily
desired therefore we have a trust model whereby signatures from
collaborators are marked trusted, signatures matching the commit line
are marked untrusted and signatures that match a user in the db but not
the committer line are marked unmatched.

The problem with this model is that this conflicts with Github therefore
we need to provide an option to allow users to choose the Github model
should they wish to.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Adjust locale strings

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @6543

Co-authored-by: 6543 <6543@obermui.de>

* Update models/gpg_key.go

* Add migration for repository

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-20 00:44:55 +08:00
GiteaBot 89c94e2f8e [skip ci] Updated translations via Crowdin 2020-09-18 17:51:09 +00:00
GiteaBot 7250f5342f [skip ci] Updated translations via Crowdin 2020-09-18 12:10:52 +00:00
GiteaBot afea4faa33 [skip ci] Updated translations via Crowdin 2020-09-17 18:25:33 +00:00
赵智超 d8b5235ded
Add ui style for "Open a blank issue" button (#12824)
* Add ui style for "Open a blank issue" button

Signed-off-by: a1012112796 <1012112796@qq.com>

* Apply review suggestion @silverwind

* format

* format 2

* fix message

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-16 10:07:09 +08:00
GiteaBot ace8a283f1 [skip ci] Updated translations via Crowdin 2020-09-15 23:50:35 +00:00
GiteaBot 81ed47c29d [skip ci] Updated translations via Crowdin 2020-09-15 14:38:30 +00:00
GiteaBot 3d0ad2885a [skip ci] Updated translations via Crowdin 2020-09-15 11:29:56 +00:00
GiteaBot c950ea10ab [skip ci] Updated translations via Crowdin 2020-09-14 18:43:45 +00:00
GiteaBot 6a1a6332de [skip ci] Updated translations via Crowdin 2020-09-14 11:49:03 +00:00
GiteaBot 33f606ce4c [skip ci] Updated translations via Crowdin 2020-09-14 10:41:18 +00:00
GiteaBot 53b656582e [skip ci] Updated translations via Crowdin 2020-09-13 01:49:50 +00:00
GiteaBot 55e05ad1ce [skip ci] Updated translations via Crowdin 2020-09-12 12:32:50 +00:00
赵智超 ae528d8321
Translate two small lables on commit statuse list (#12821)
* Requested
* Details

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-09-12 15:29:50 +08:00
GiteaBot c18c6cf4cf [skip ci] Updated translations via Crowdin 2020-09-11 20:20:02 +00:00
John Olheiser 26c4a049da
Issue templates directory (#11450)
* Issue templates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add some comments, appease the linter

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add docs and re-use dir candidates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add default labels to issue templates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Generate swagger

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Suggested changes

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update issue.go

* Suggestions

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Extract metadata from legacy if possible

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-11 10:48:39 -04:00
GiteaBot 910947fbcd [skip ci] Updated translations via Crowdin 2020-09-11 12:39:57 +00:00
zeripath 4eb0a1dfaf
Disable watch and star if not signed in (#12807)
Fix #12070

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-09-11 12:01:51 +01:00
GiteaBot 29ac1f9122 [skip ci] Updated translations via Crowdin 2020-09-11 06:45:37 +00:00
GiteaBot 5b10da241b [skip ci] Updated translations via Crowdin 2020-09-10 17:06:38 +00:00
John Olheiser c3e8c9441a
Add check for LDAP group membership (#10869)
This is a port of gogs/gogs#4398

The only changes made by myself are:

Add locales
Add some JS to the UI
Otherwise all code credit goes to @aboron

Resolves #10829

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-09-10 16:30:07 +01:00
Bagas Sanjaya 4c42fce401
Add placeholder text for bio profile text form (#12792)
* Add placeholder text
  * Localize
2020-09-10 15:29:26 +01:00
GiteaBot 7354efe702 [skip ci] Updated translations via Crowdin 2020-09-10 13:05:36 +00:00
GiteaBot b333aa7db4 [skip ci] Updated translations via Crowdin 2020-09-10 04:17:37 +00:00
GiteaBot fcc410c350 [skip ci] Updated translations via Crowdin 2020-09-09 19:09:54 +00:00
GiteaBot 0cd49aaebd [skip ci] Updated translations via Crowdin 2020-09-09 18:30:16 +00:00
Lunny Xiao e153cf07c3
Add a migrate service type switch page (#12697)
* Add a migrat service type switch page

* Improve translations

* remove images

* Fix images

* remove extra create repo button on dashboard

* Follow reviewers' opinions

* Fix frontend lint

* Remove wrong submit file

* Fix tests

* Adjust the size of image

* Apply suggestions from code review

Co-authored-by: 赵智超 <1012112796@qq.com>

* Remove username and password from migration of github/gitlab

* Improve docs

* Improve interface docs

Co-authored-by: 赵智超 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-09 14:29:10 -04:00
GiteaBot 6483dbc8ec [skip ci] Updated translations via Crowdin 2020-09-09 17:32:39 +00:00
GiteaBot 090024db37 [skip ci] Updated translations via Crowdin 2020-09-09 13:09:44 +00:00
GiteaBot 1fbc50f974 [skip ci] Updated translations via Crowdin 2020-09-08 22:07:38 +00:00
John Olheiser c6e4bc53aa
Check passwords against HaveIBeenPwned (#12716)
* Implement pwn

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update module

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Apply suggestions mrsdizzie

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Add link to HIBP

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add more details to admin command

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add context to pwn

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Consistency and making some noise ;)

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-09-08 17:06:39 -05:00
Vedran e204398754
Change/remove a branch of an open issue (#9080)
* Add field with isIssueWriter to front end

* Make branch field editable

* Switch frontend to form and POST from javascript

* Add /issue/id/ref endpoint to routes

* Use UpdateIssueTitle model to change ref in backend

* Removed crossreference check and adding comments on branch change

* Use ref returned from POST to update the field

* Prevent calling loadRepo from models/

* Branch/tag refreshed without page reload

* Remove filter for empty branch name

* Add clear option to tag list as well

* Delete button translation and coloring

* Fix for not showing selected branch name in new issue

* Check that branch is not being changed on a PR

* Change logic

* Notification when changing issue ref

* Fix for renamed permission parameter

* Fix for failing build

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-08 12:29:51 -04:00
GiteaBot 0ed8d268ad [skip ci] Updated translations via Crowdin 2020-09-08 15:46:14 +00:00
GiteaBot 9af60ce0bb [skip ci] Updated translations via Crowdin 2020-09-07 22:28:18 +00:00
GiteaBot 226aef7e0f [skip ci] Updated translations via Crowdin 2020-09-07 15:06:09 +00:00
GiteaBot 0b198eb392 [skip ci] Updated translations via Crowdin 2020-09-06 19:54:31 +00:00
GiteaBot 332dbe7393 [skip ci] Updated translations via Crowdin 2020-09-06 16:26:12 +00:00
zeripath f727e3e1c9
Fix editor.commit_empty_file_text locale string (#12744)
editor.commit_empty_file_text should read `about to commit`
not `about commit`

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-06 12:24:24 -04:00
GiteaBot 43c303d35c [skip ci] Updated translations via Crowdin 2020-09-06 15:39:00 +00:00
GiteaBot 0ed5e103fe [skip ci] Updated translations via Crowdin 2020-09-06 15:01:20 +00:00
GiteaBot a755e5adeb [skip ci] Updated translations via Crowdin 2020-09-06 10:35:50 +00:00
GiteaBot 0cc4aadf58 [skip ci] Updated translations via Crowdin 2020-09-06 08:55:26 +00:00
GiteaBot 67ec27150e [skip ci] Updated translations via Crowdin 2020-09-05 22:51:54 +00:00
GiteaBot 78509b5f9b [skip ci] Updated translations via Crowdin 2020-09-05 20:13:09 +00:00
GiteaBot 913ac9cacd [skip ci] Updated translations via Crowdin 2020-09-05 17:39:52 +00:00
6543 1ea1cade85
Add Created & Updated to Milestone (#12662)
* Add Created and Updated to Milestone table and expose via API

* Expose to UI - To Overloaded ?!?

* fix unit test

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-05 13:38:54 -04:00
GiteaBot 7404786420 [skip ci] Updated translations via Crowdin 2020-09-05 16:43:55 +00:00
GiteaBot e80eda7d01 [skip ci] Updated translations via Crowdin 2020-09-05 11:59:34 +00:00
GiteaBot 9837b598fc [skip ci] Updated translations via Crowdin 2020-09-04 22:47:21 +00:00
GiteaBot 45c0ec3152 [skip ci] Updated translations via Crowdin 2020-09-04 17:30:03 +00:00
6543 ca81b6528b
UI: Inform user what meaning hourglass on reviews has (#12713)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-04 12:36:37 -04:00
GiteaBot 42a5e39b3b [skip ci] Updated translations via Crowdin 2020-09-03 21:27:49 +00:00
GiteaBot 6d6b5ceaa5 [skip ci] Updated translations via Crowdin 2020-09-03 18:59:33 +00:00
GiteaBot 8fa7a4b511 [skip ci] Updated translations via Crowdin 2020-09-03 10:12:22 +00:00
GiteaBot baa93855e8 [skip ci] Updated translations via Crowdin 2020-09-03 07:36:13 +00:00
GiteaBot ed81a95a84 [skip ci] Updated translations via Crowdin 2020-09-02 20:20:42 +00:00
6543 84eac6ed6c
Add make targed generate-license & generate-gitignore + Update (#12682)
* Add make targed generate-license & generate-gitignore

* Update Gitignores & Licenses

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-02 12:57:08 -04:00
GiteaBot 3ecd030cd5 [skip ci] Updated translations via Crowdin 2020-09-02 16:56:15 +00:00
GiteaBot ea775e67fb [skip ci] Updated translations via Crowdin 2020-09-02 15:02:44 +00:00
GiteaBot 66843f2237 [skip ci] Updated translations via Crowdin 2020-08-31 17:13:45 +00:00
GiteaBot 807a41ca9a [skip ci] Updated translations via Crowdin 2020-08-30 22:55:54 +00:00
GiteaBot 274f9233ab [skip ci] Updated translations via Crowdin 2020-08-28 17:40:33 +00:00
GiteaBot 3bf1c4fad0 [skip ci] Updated translations via Crowdin 2020-08-28 14:40:48 +00:00
zeripath 1d47a25759
Fix confusing last_org_owner locale string (#12628)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-08-28 09:39:50 -05:00
GiteaBot cbc60f5c70 [skip ci] Updated translations via Crowdin 2020-08-28 02:48:16 +00:00
John Olheiser 211321fb93
Git migration UX (#12619)
* Initial work

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Implementation

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix gitlab and token cloning

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Imports and JS

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix test

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Linting

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Generate swagger

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move mirror toggle and rename options

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-08-28 09:36:37 +08:00
GiteaBot ed2f6e137b [skip ci] Updated translations via Crowdin 2020-08-27 20:46:30 +00:00
赵智超 65444c5ea3
Add link to home page on swagger ui (#12601)
* Add link to home page on swagger ui

Signed-off-by: a1012112796 <1012112796@qq.com>

* translate

* Apply review suggestion

* Move to right, Thanks @silverwind

* tweaks

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-26 12:39:45 -04:00
GiteaBot 63f3c42be9 [skip ci] Updated translations via Crowdin 2020-08-24 15:49:17 +00:00
zeripath 1bf7b8d7c1
Fix signing.wont_sign.%!s(<nil>) if Require Signing commits but not signed in (#12581)
signing.wont_sign.%!s(<nil>) will be displayed if the repository needs signed
commits but the user is not logged in.

This is displayed because of complicated logic in the the template repo/issue/view_content/pull.tmpl
and a shortcut in the code of routers/repo/issue.go

This PR adds a default value of notsignedin if users are not signed in, which
although our templates will not show will prevent custom templates from showing
the above.

It also fixes the template to avoid showing signing errors if the user is not
authorized to sign.

Replaces #12564
Close #12564

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-08-23 22:59:41 +01:00
GiteaBot d2cee3eea6 [skip ci] Updated translations via Crowdin 2020-08-23 16:03:36 +00:00
GiteaBot a0484890c1 [skip ci] Updated translations via Crowdin 2020-08-22 01:24:01 +00:00
GiteaBot d461591aac [skip ci] Updated translations via Crowdin 2020-08-21 22:43:28 +00:00
GiteaBot ae23bbdae3 [skip ci] Updated translations via Crowdin 2020-08-21 07:54:15 +00:00
GiteaBot 69a77b2a73 [skip ci] Updated translations via Crowdin 2020-08-20 16:31:53 +00:00
Bagas Sanjaya fff0204cab
Add placeholder text for "Add SSH/GPG Key" forms (#12533)
* Add placeholder text for "Add SSH/GPG Key" forms

This commit add placeholder text for both Add SSH key and Add GPG key
forms.

* Localize placeholders

Changes requested by @zeripath

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-20 11:51:34 -04:00
6543 dcb543ac2a
Show 2FA info on Admin Pannel: Users List (#12515) 2020-08-20 09:53:49 +08:00
GiteaBot 61a172900e [skip ci] Updated translations via Crowdin 2020-08-18 11:22:27 +00:00
GiteaBot 87fbb54abb [skip ci] Updated translations via Crowdin 2020-08-18 04:24:48 +00:00
GiteaBot 02fbe1e5dc [skip ci] Updated translations via Crowdin 2020-08-17 19:13:00 +00:00
GiteaBot 5b9e7cf53c [skip ci] Updated translations via Crowdin 2020-08-17 16:59:11 +00:00
GiteaBot 9cabd56fc0 [skip ci] Updated translations via Crowdin 2020-08-17 15:59:38 +00:00
6543 05b1af990e
add & correct Translation (#12507) 2020-08-17 11:58:23 -04:00
Lanre Adelowo 4027c5dd7c
Kanban board (#8346)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
Co-authored-by: Kerry <flatline-studios@users.noreply.github.com>
Co-authored-by: Jaqra <jaqra@hotmail.com>
Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com>
Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com>
Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-16 23:07:38 -04:00
GiteaBot e01bac8404 [skip ci] Updated translations via Crowdin 2020-08-13 04:20:08 +00:00
GiteaBot faa676cc8b [skip ci] Updated translations via Crowdin 2020-08-11 14:49:29 +00:00
Bagas Sanjaya a4ba1ad5ed
Add placeholder text for send testing email button in admin/config (#12452)
* Add placeholder text for send testing email button in admin/config

* Change placeholder text to expecting email address

* Localize placeholder text

* Apply suggestion from @silverwind

ok

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-08-10 22:38:30 -04:00
GiteaBot 25a6705b86 [skip ci] Updated translations via Crowdin 2020-08-10 13:02:16 +00:00
GiteaBot 8cd7e93b9a [skip ci] Updated translations via Crowdin 2020-08-06 16:42:54 +00:00
zeripath 2c1ae6c82d
Render the git graph on the server (#12333)
Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation.

* This implementation provides a 16 limited color selection
* The uniqued color numbers are also provided
* And there is also a monochrome version
*In addition is a hover highlight that allows users to highlight commits on the same flow.

Closes #12209

Signed-off-by: Andrew Thornton art27@cantab.net
Co-authored-by: silverwind <me@silverwind.io>
2020-08-06 09:04:08 +01:00
GiteaBot 999ae61d01 [skip ci] Updated translations via Crowdin 2020-07-31 13:27:50 +00:00
GiteaBot 838fef2ae8 [skip ci] Updated translations via Crowdin 2020-07-30 16:28:29 +00:00
赵智超 1f12dc8e88
Add action feed for new release (#12324)
* Add action feed for new release

Signed-off-by: a1012112796 <1012112796@qq.com>

* fix lint

* Apply suggestions from code review

* Add ReleaseID to the action table
* Remove error message
* Fold the attachments download list

* remove attchment download list

* simplify code

* fix create release from existing tag

* simplify ui

* translation change

* fix test

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-07-29 15:20:54 -04:00
GiteaBot d0c690f160 [skip ci] Updated translations via Crowdin 2020-07-26 09:49:14 +00:00
GiteaBot d489def5ed [skip ci] Updated translations via Crowdin 2020-07-21 12:29:30 +00:00
GiteaBot ed8e064f5e [skip ci] Updated translations via Crowdin 2020-07-19 09:54:41 +00:00
GiteaBot 670db99f4f [skip ci] Updated translations via Crowdin 2020-07-15 04:38:43 +00:00
GiteaBot 3b498ebc77 [skip ci] Updated translations via Crowdin 2020-07-14 02:10:41 +00:00
GiteaBot 6a62884782 [skip ci] Updated translations via Crowdin 2020-07-09 21:14:09 +00:00
GiteaBot ae2916c792 [skip ci] Updated translations via Crowdin 2020-07-06 08:58:05 +00:00
GiteaBot 38fb087d19 [skip ci] Updated translations via Crowdin 2020-07-05 22:41:35 +00:00
zeripath 217647f331
Multiple small admin dashboard fixes (#12153)
* Remove spurious spacing between Maintenance Operations and its table on dashboard
* Prevent (EXTRA string) comments in Task headers
* Redirect tasks started from monitor page back to monitor
* Fix #12107 - redirects from process cancel should use AppSubUrl
* When wrapping queues set the name correctly

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-07-05 22:38:03 +03:00
GiteaBot 480ac25ed5 [skip ci] Updated translations via Crowdin 2020-07-02 14:56:42 +00:00
zeripath 482ba937ed
Provide option to unlink a fork (#11858)
* Provide option to unlink a fork

Fix #4566

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review

Co-authored-by: techknowlogick <matti@mdranta.net>

* Add check that user can create repo

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @cirnoT

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-07-02 15:09:09 +01:00
GiteaBot 712d88ea1d [skip ci] Updated translations via Crowdin 2020-07-01 18:17:01 +00:00
GiteaBot 9ad04240a6 [skip ci] Updated translations via Crowdin 2020-06-27 20:33:22 +00:00
Linkjay 2ff585f0da
Fix some periods and language usage in en-US locale (#12067) 2020-06-27 14:11:35 +03:00
GiteaBot 043ed32ab5 [skip ci] Updated translations via Crowdin 2020-06-26 13:06:41 +00:00
GiteaBot 5b1327eb56 [skip ci] Updated translations via Crowdin 2020-06-24 04:11:05 +00:00
Cirno the Strongest d9aa007a9e
Use label to describe repository type (#11891)
* Use label instead of icon to describe repository type when repo avatar is set

* header_icon is not longer duplicated; move out of separate template

* handle archived case too

* use everywhere

* public template -> template

* bring back separate icon in better form

* definitely was overthinking this

* 32

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-22 16:20:51 -04:00
GiteaBot a7f7d1399f [skip ci] Updated translations via Crowdin 2020-06-15 17:27:05 +00:00
GiteaBot d1c547468a [skip ci] Updated translations via Crowdin 2020-06-14 13:56:16 +00:00
GiteaBot 83e9ac57a1 [skip ci] Updated translations via Crowdin 2020-06-12 18:03:15 +00:00
silverwind bc4f7ba69b
Add automatic JS license generation (#11810)
* Add automatic JS license generation

Removed librejs file and replaced it with a plaintext file that is built
from all JS dependencies that are included in the webpack build. It does
not cover the few remaining statically vendored files and fomantic is
added manually because it's not yet in the webpack build process.

Fixes: https://github.com/go-gitea/gitea/issues/11630

* fix lint

* remove jslicense, we're not librejs compatible any more

* remove license.txt test as it depens on absent files

* small optimization

* trailing comma

* localize and capitalize the word 'licenses'

* reduce text to just 'Licenses'

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-12 14:26:37 +03:00
GiteaBot 13fcd04fe4 [skip ci] Updated translations via Crowdin 2020-06-12 03:35:58 +00:00
GiteaBot 6c2a59b50c [skip ci] Updated translations via Crowdin 2020-06-11 21:45:34 +00:00
silverwind ca8ecf7ffc
Improve label edit buttons labels (#11841)
* Improve label edit buttons labels

Previously when editing the buttons in the "Edit Label" modal were a
strange "Update" and "No". Improved them to "Save" and "Cancel".

Also fixed indentation in the template file, recommended to view changes
with the "Hide whitespace changes" option enabled on GitHub.

* remove unnecessary button icon

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 17:06:20 -04:00
GiteaBot df231b7255 [skip ci] Updated translations via Crowdin 2020-06-10 12:06:44 +00:00
GiteaBot 218d922d33 [skip ci] Updated translations via Crowdin 2020-06-08 18:08:42 +00:00
GiteaBot 3f3a081758 [skip ci] Updated translations via Crowdin 2020-06-07 15:24:09 +00:00
GiteaBot 1cc33c37ff [skip ci] Updated translations via Crowdin 2020-06-07 11:49:39 +00:00
GiteaBot 304542af31 [skip ci] Updated translations via Crowdin 2020-06-06 20:31:10 +00:00
GiteaBot c8b1c4b10a [skip ci] Updated translations via Crowdin 2020-06-06 14:16:14 +00:00
GiteaBot f576756b18 [skip ci] Updated translations via Crowdin 2020-06-05 22:52:05 +00:00
GiteaBot cc9d2deb60 [skip ci] Updated translations via Crowdin 2020-06-05 20:48:38 +00:00
GiteaBot 209b17c4e2 [skip ci] Updated translations via Crowdin 2020-06-05 20:02:46 +00:00
l-jonas aa3c0f8eba
Add hide activity option (#11353)
* Add hide activity option

This closes https://github.com/go-gitea/gitea/issues/7927

* Adjust for linter

* Adjust for linter

* Add tests

* Remove info that admins can view the activity

* Adjust new tests for linter

* Rename v139.go to v140.go

* Rename v140.go to v141.go

* properly indent

* gofmt

Co-authored-by: Jonas Lochmann <git@inkompetenz.org>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-05 16:01:53 -04:00
John Olheiser ac07418011
Add compare link to releases (#11752)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-05 14:44:54 -04:00
GiteaBot 48f24c7b32 [skip ci] Updated translations via Crowdin 2020-06-05 14:35:50 +00:00
Emanuel Angelo a39557f8fb
European Portuguese translation (#11568)
This PR includes the modifications necessary to make use of the European Portuguese translation from the default setting.
2020-06-05 09:07:56 +01:00
GiteaBot c6cee44134 [skip ci] Updated translations via Crowdin 2020-06-03 18:19:35 +00:00
GiteaBot 19aab76853 [skip ci] Updated translations via Crowdin 2020-06-03 15:38:09 +00:00
GiteaBot 4280d44a45 [skip ci] Updated translations via Crowdin 2020-06-03 08:31:48 +00:00
GiteaBot 2cf99f89c6 [skip ci] Updated translations via Crowdin 2020-06-03 06:10:22 +00:00
Cirno the Strongest 8e035f81c0
Fix styling for commiter on diff view (#11715)
* Fix styling for commiter on diff view

* Update options/locale/locale_en-US.ini

* Update templates/repo/commit_page.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Update templates/repo/commit_page.tmpl

Co-authored-by: silverwind <me@silverwind.io>

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-02 22:40:08 -04:00
John Olheiser a6fd2f23f7
Allow site admin to disable mirrors (#11740)
* Allow site admin to disable mirrors

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* No need to run through Safe

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Clarify only disabling NEW mirrors

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Apply suggestions from @guillep2k

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-06-02 21:21:38 -04:00
GiteaBot 7cb1e1f609 [skip ci] Updated translations via Crowdin 2020-05-31 21:00:58 +00:00
GiteaBot 0d9f9f7de1 [skip ci] Updated translations via Crowdin 2020-05-29 13:25:34 +00:00
赵智超 ab73b56575
translate: Change translate for admin.config.enable_captcha (#11657)
* translate: Change translate for admin.config.enable_captcha

add 'register' to make it more accurate

Signed-off-by: a1012112796 <1012112796@qq.com>

* Update options/locale/locale_en-US.ini

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-29 11:36:51 +03:00
GiteaBot cd5b0e262e [skip ci] Updated translations via Crowdin 2020-05-27 20:33:27 +00:00
GiteaBot 926e63bb9e [skip ci] Updated translations via Crowdin 2020-05-26 21:12:40 +00:00
GiteaBot 55b4b4e8a5 [skip ci] Updated translations via Crowdin 2020-05-26 03:50:57 +00:00
Cirno the Strongest 8443ca109b
Make issues.force_push_codes message shorter (#11575)
Also removes stray dot and whitespace.

Trying to make base message shorter; I don't envy translators, the message can easily get multi-line in English, I'm sure that is even bigger problem in other languages.
2020-05-25 20:50:52 +01:00
GiteaBot e25348da88 [skip ci] Updated translations via Crowdin 2020-05-24 14:40:08 +00:00
GiteaBot f6f49700cc [skip ci] Updated translations via Crowdin 2020-05-22 00:03:16 +00:00
GiteaBot 460bc32c71 [skip ci] Updated translations via Crowdin 2020-05-21 13:49:42 +00:00
GiteaBot 7c287b9f0b [skip ci] Updated translations via Crowdin 2020-05-20 18:36:38 +00:00
GiteaBot 21243bb46f [skip ci] Updated translations via Crowdin 2020-05-20 17:13:30 +00:00
GiteaBot 3856fd7c10 [skip ci] Updated translations via Crowdin 2020-05-20 16:17:40 +00:00
赵智超 0903b1ac8c
Add push commits history comment on PR time-line (#11167)
* Add push commits history comment on PR time-line
* Add notify by email and ui of this comment type also

Signed-off-by: a1012112796 <1012112796@qq.com>

* Add migrations for IsForcePush
* fix wrong force-push judgement
* Apply suggestions from code review
* Remove commit number check
* add own notify fun
* fix some typo

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

* fix lint

* fix style again, I forgot something before

* Change email notify way

* fix api

* add number check if It's force-push

* Add repo commit link fuction
remove unnecessary check
skip show push commits comment which not have commits alive

* Update issue_comment.go

* Apply suggestions from code review

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Apply suggestions from code review

* fix ui view

Co-authored-by: silverwind <me@silverwind.io>

* fix height

* remove unnecessary style define

* simplify GetBranchName

* Apply suggestions from code review

* save commit ids and isForce push by json
* simplify GetBranchName

* fix bug

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
2020-05-20 09:47:24 -03:00
GiteaBot b5851b7d1a [skip ci] Updated translations via Crowdin 2020-05-19 20:25:38 +00:00
GiteaBot b72af7ee71 [skip ci] Updated translations via Crowdin 2020-05-17 23:29:05 +00:00
6543 9a829b98f0
Fix "Unknown task: git_fsck" error on admin dashboard (#11468) 2020-05-17 23:14:33 +01:00
GiteaBot fb43fbe0aa [skip ci] Updated translations via Crowdin 2020-05-17 15:36:19 +00:00
GiteaBot 580f73ad79 [skip ci] Updated translations via Crowdin 2020-05-17 14:16:15 +00:00
GiteaBot 4e302baa4c [skip ci] Updated translations via Crowdin 2020-05-17 12:44:33 +00:00
GiteaBot 50932ce8af [skip ci] Updated translations via Crowdin 2020-05-17 11:11:07 +00:00
Lauris BH 75918d9dc6
Fix translation to be compatible with crowdin (#11453) 2020-05-17 12:18:59 +03:00
GiteaBot 5cf224abe3 [skip ci] Updated translations via Crowdin 2020-05-17 00:49:40 +00:00
GiteaBot dcb0cf7470 [skip ci] Updated translations via Crowdin 2020-05-16 23:33:25 +00:00
zeripath 9a2e47b23a
Refactor Cron and merge dashboard tasks (#10745)
* Refactor Cron and merge dashboard tasks

* Merge Cron and Dashboard tasks
* Make every cron task report a system notice on completion
* Refactor the creation of these tasks
* Ensure that execution counts of tasks is correct
* Allow cron tasks to be started from the cron page

* golangci-lint fixes

* Enforce that only one task with the same name can be registered

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix name check

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @guillep2k

* as per @lafriks

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add git.CommandContext variants

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-05-16 19:31:38 -04:00
GiteaBot aaaaeb7050 [skip ci] Updated translations via Crowdin 2020-05-16 21:07:43 +00:00
zeripath c86bc8e061
Add paging and archive/private repository filtering to dashboard list (#11321)
* Add archived options to SearchRepository

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add only-private search

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add filter options and paging to dashboard repository page

Signed-off-by: Andrew Thornton <art27@cantab.net>

* swagger generate

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix-swagger-again

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @mrsdizzie also remember state

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-16 23:07:01 +03:00
GiteaBot 591ca030f0 [skip ci] Updated translations via Crowdin 2020-05-14 21:35:09 +00:00
GiteaBot a552af8f0d [skip ci] Updated translations via Crowdin 2020-05-14 18:00:33 +00:00
GiteaBot 984ee0113b [skip ci] Updated translations via Crowdin 2020-05-13 23:00:00 +00:00
John Olheiser 0ba610011b
Change install description (#11395)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-13 12:08:44 +03:00
GiteaBot 2f9e6cae48 [skip ci] Updated translations via Crowdin 2020-05-13 07:52:13 +00:00
GiteaBot 6a02a4f57a [skip ci] Updated translations via Crowdin 2020-05-11 22:05:16 +00:00
GiteaBot 45968b9f44 [skip ci] Updated translations via Crowdin 2020-05-11 09:45:39 +00:00
GiteaBot 59b9b77a0d [skip ci] Updated translations via Crowdin 2020-05-11 08:39:13 +00:00
L0veSunshine 866ce126ec
Split some words from template to improve translation. (#11221)
* split some words from template

* split some words from template

* add " " to mustache expression

* split some words from template

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-05-08 13:39:17 +01:00
GiteaBot a6b8de282c [skip ci] Updated translations via Crowdin 2020-05-07 06:48:52 +00:00
6543 505e456f26
Protect default branch against deletion (#11115)
Although default branch is not offered for deletion in the templates, we need to prevent it both at the router level and in the pre-receive hook.

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-06 12:08:45 +01:00
Kyle Evans 38cd9ba47b
Allow unauthenticated users to compare (#11240)
* routers: make /compare route available to unauthenticated users

Remove some bits of the compare interface if the user isn't signed in.
Notably, they don't need to see the "New Pull Request" button box nor the
hidden form that would fail to submit due to the POST request continuing to
require proper privileges.

Follow-up commits will improve the UI a bit around this, removing some
"Pull Request" verbiage in favor of "Compare."

* ui: home: show "compare" button for unauthenticated users

This change requires pulling in the BaseRepo unconditionally and
recording if the pull request is in-fact not allowed
(.PullRequestCtx.Allowed). If the user isn't allowed to create a pull
request, either because this isn't a fork or same-fork branch PRs aren't
allowed, then we'll name the button "Compare" instead of "Pull Request."

* ui: branch list: use the new Compare language when available

When viewing the branch listing as an unauthenticated user, you'll get
"Pull Request" buttons. use the new "Compare" verbiage instead, which
matches GitHub behavior when you can't issue a pull request from the
branches.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-05-04 19:44:30 -03:00
GiteaBot 472a7702a7 [skip ci] Updated translations via Crowdin 2020-05-03 03:59:30 +00:00
zeripath 4f9d59be17
Sendmail should create a process on the gitea system and have a default timeout (#11256)
* Make sure that sendmail processes register with the process manager
* Provide a timeout for these (initially of 5 minutes)
* Add configurable value and tie in to documentation
* Tie in to the admin config page.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-05-03 00:04:31 +01:00
GiteaBot 319eb83112 [skip ci] Updated translations via Crowdin 2020-05-02 14:05:12 +00:00
GiteaBot 452b69b71e [skip ci] Updated translations via Crowdin 2020-05-02 00:22:11 +00:00
mrsdizzie 4ed7d2a2bb
Remove last traces of has-emoji class (#11263)
Now that emojify.js has been removed, get rid of all instances of has-emoji class that was only used for that. Support for rendering shortcodes should remain in all of these places so it should still work the same.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-01 20:58:45 +03:00
GiteaBot c25969e694 [skip ci] Updated translations via Crowdin 2020-04-30 15:14:00 +00:00
silverwind 28e5e7fcbc
Add a 'this' to issue close/reopened messages (#11204)
* add a 'this' to issue close/reopened messages

* add 'this issue/pull request' and create new localization entries

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-30 14:49:12 +01:00
GiteaBot b0849abf3d [skip ci] Updated translations via Crowdin 2020-04-27 23:43:08 +00:00
6543 41cebeb8fa
Make error pages translatable (#11163)
* make error pages translatable

* dont translate ":"

* link need Safe
2020-04-27 18:03:15 -05:00
GiteaBot 6a3de9e25f [skip ci] Updated translations via Crowdin 2020-04-27 11:21:30 +00:00
zeripath 812cfd0ad9
Use markdown frontmatter to provide Table of contents, language and frontmatter rendering (#11047)
* Add control for the rendering of the frontmatter
* Add control to include a TOC
* Add control to set language - allows control of ToC header and CJK glyph choice.

Signed-off-by: Andrew Thornton art27@cantab.net
2020-04-24 14:22:36 +01:00
GiteaBot c0d71f5e26 [skip ci] Updated translations via Crowdin 2020-04-22 10:36:05 +00:00
GiteaBot cac69903ae [skip ci] Updated translations via Crowdin 2020-04-20 16:48:24 +00:00
GiteaBot 7179e49881 [skip ci] Updated translations via Crowdin 2020-04-20 13:11:58 +00:00
GiteaBot da3e85a502 [skip ci] Updated translations via Crowdin 2020-04-20 09:09:35 +00:00
GiteaBot 77fecec64f [skip ci] Updated translations via Crowdin 2020-04-19 20:24:31 +00:00
GiteaBot 16f39ce426 [skip ci] Updated translations via Crowdin 2020-04-19 02:39:34 +00:00
Sorien 0ef11ff2c9
consolidate author name across timeline (#11053)
* consolidate author name across timeline

* Sync with master

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-04-19 03:15:07 +03:00
赵智超 1b86f174ce
Add a way to mark Conversation (code comment) resolved (#11037)
* Add a way to mark Conversation (code comment) resolved

mark Conversation is a way to mark a Conversation is stale
or be solved. when it's marked as stale, will be hided like
stale. all Pull Request writer , Offical Reviewers and poster
can add or remove Conversation resolved mark.

Signed-off-by: a1012112796 <1012112796@qq.com>

* fix lint

* Apply suggestions from code review

* Add ResolveDoer
* fix ui

Co-Authored-By: Lauris BH <lauris@nix.lv>
Co-Authored-By: 6543 <6543@obermui.de>

* change IsResolved to an function
Add permission check in UpdateResolveConversation

* Apply suggestions from code review

* change return error for permisson check
* add default message for deleted user
* get issue message from comment
* add migration for ``ResolveDoerID`` column

another  change:
* block mark pending review as resolved because it's not necessary

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

* change button color

* resolve button size

* fix code style

* remove unusefull code

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-18 10:50:25 -03:00
GiteaBot 7eace60bb6 [skip ci] Updated translations via Crowdin 2020-04-18 04:20:32 +00:00
GiteaBot 0010fde8a2 [skip ci] Updated translations via Crowdin 2020-04-17 16:36:23 +00:00
6543 c52d48aae4
Prevent merge of outdated PRs on protected branches (#11012)
* Block PR on Outdated Branch

* finalize

* cleanup

* fix typo and sentences

thanks @guillep2k

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-16 22:00:36 -03:00
GiteaBot 2cb5878529 [skip ci] Updated translations via Crowdin 2020-04-16 21:27:45 +00:00
GiteaBot eeb968eab5 [skip ci] Updated translations via Crowdin 2020-04-16 19:09:25 +00:00
CirnoT e93826675c
Add missing commit states to PR checks template (#11085)
* Add missing commit states to PR checks template

* Add separate translation strings for warning and error

* Fix failure status string

* Revert accidental change with whitespace
2020-04-16 14:08:20 -05:00
GiteaBot 9ffa89249e [skip ci] Updated translations via Crowdin 2020-04-16 15:35:01 +00:00
GiteaBot 1b1b51d919 [skip ci] Updated translations via Crowdin 2020-04-16 10:45:52 +00:00
GiteaBot 0040f8bf67 [skip ci] Updated translations via Crowdin 2020-04-15 20:36:28 +00:00
6543 a88f3663eb
Fix merge dialog on protected branch with missing required statuses (#11074)
It is possible for misconfigured protected branches to have required status checks that are not in any of the current statuses: Pending, Success, Error, Failure, or Warning - presumably because the CI has not contacted us as yet.

Fix #10636 by adding case: missing StatusChecks when these are missing
2020-04-15 21:35:18 +01:00
GiteaBot 30690f6644 [skip ci] Updated translations via Crowdin 2020-04-15 17:42:06 +00:00
GiteaBot 7a67bcc204 [skip ci] Updated translations via Crowdin 2020-04-15 13:04:26 +00:00
GiteaBot 0ad0357233 [skip ci] Updated translations via Crowdin 2020-04-14 18:33:15 +00:00
GiteaBot c571c5bb28 [skip ci] Updated translations via Crowdin 2020-04-14 11:38:33 +00:00
赵智超 281029529b
ui: Add MergePull comment type instead of close for merge PR (#11058)
Signed-off-by: a1012112796 <1012112796@qq.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-14 09:06:23 +08:00
6543 ad5c43ae5d
Reject duplicate AccessToken names (#10994)
* make sure duplicate token names cannot be used

* add check to api routes too

* add @lunny s suggestion

* fix & don't forget User.ID

* AccessTokenByNameExists() return error too

* unique token for each test

* fix lint

Signed-off-by: 6543 <6543@obermui.de>

Co-authored-by: Lanre Adelowo <yo@lanre.wtf>
2020-04-13 22:02:48 +03:00
GiteaBot 980ef24251 [skip ci] Updated translations via Crowdin 2020-04-13 13:03:35 +00:00
Sorien c97e988380
Prettify Timeline (#10972)
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
2020-04-11 01:01:41 +03:00
GiteaBot 0a2cba972a [skip ci] Updated translations via Crowdin 2020-04-10 10:43:04 +00:00
John Olheiser 4ec7a659ce
Add git hook tooltip (#11030)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-04-09 18:15:09 -05:00
赵智超 ca714db4fd
ui:Add flash notify for email preference seting success (#11027)
* Add flash notify for email preference seting success

Signed-off-by: a1012112796 <1012112796@qq.com>

* add review suggest changes

Co-authored-by: Lauris BH <lauris@nix.lv>

Co-Authored-By: Lauris BH <lauris@nix.lv>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-09 13:22:17 -04:00
GiteaBot 4c54477bb5 [skip ci] Updated translations via Crowdin 2020-04-07 11:04:55 +00:00
GiteaBot d79ff1dd32 [skip ci] Updated translations via Crowdin 2020-04-06 20:20:08 +00:00
赵智超 ef89e75d0e
add request review from specific reviewers feature in pull request (#10756)
* add request review feature in pull request

add a way to notify specific reviewers to review like github , by add  or delet a  special type
review . The acton is  is similar to Assign ,  so many code reuse the function and items of
Assignee, but the meaning and result is different.

The Permission style is is similar to github, that only writer can add a review request from Reviewers,
but the poster can recall and remove a review request after a reviwer has revied even if he don't have
Write Premission. only manager , the poster and reviewer of a request review can remove it.

The reviewers can be requested to review contain all readers for private repo , for public, contain
all writers and watchers.

The offical Review Request will block merge if Reject can block it.

an other change: add ui otify for Assignees.

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>

Signed-off-by: a1012112796 <1012112796@qq.com>

* new change

* add placeholder string

* do some changes follow #10238 to add review requests num on lists also
change icon for review requests to eye

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-04-06 19:33:34 +03:00
GiteaBot f072d4566f [skip ci] Updated translations via Crowdin 2020-04-05 17:02:59 +00:00
赵智超 14c97c0501
Add titles and improve messages on sidebar menus (#10872)
* ui: add more message on sidebar menus

* add title on the menus
* show some message instead of hide choose bar when have nothing to choose
* add simply filter for each menus
* do same changes in mew_form.tmpl
* remove some unusefull comments in mew_form.tmpl

Signed-off-by: a1012112796 <1012112796@qq.com>

* do review suggestions

* add filter message  on sidebar filter
* change IsIssueWriter to HasIssuesOrPullsWritePermission

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-04 02:39:48 -03:00
GiteaBot 6c27f3e4e5 [skip ci] Updated translations via Crowdin 2020-04-01 19:05:15 +00:00
GiteaBot fbb0880d37 [skip ci] Updated translations via Crowdin 2020-04-01 06:35:41 +00:00
mrsdizzie 8d99ee2773
Add Organization Wide Labels (#10814)
* Add organization wide labels

Implement organization wide labels similar to organization wide
webhooks. This lets you create individual labels for organizations that can be used
for all repos under that organization (so being able to reuse the same
label across multiple repos).

This makes it possible for small organizations with many repos to use
labels effectively.

Fixes #7406

* Add migration

* remove comments

* fix tests

* Update options/locale/locale_en-US.ini

Removed unused translation string

* show org labels in issue search label filter

* Use more clear var name

* rename migration after merge from master

* comment typo

* update migration again after rebase with master

* check for orgID <=0 per guillep2k review

* fmt

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* remove unused code

* Make sure RepoID is 0 when searching orgID per code review

* more changes/code review requests

* More descriptive translation var per code review

* func description/delete comment when issue label deleted instead of hiding it

* remove comment

* only use issues in that repo when calculating number of open issues for org label on repo label page

* Add integration test for IssuesSearch API with labels

* remove unused function

* Update models/issue_label.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Use subquery in GetLabelIDsInReposByNames

* Fix tests to use correct orgID

* fix more tests

* IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well

* update comment for clarity

* Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition

* Don't sort repos by date in IssuesSearch API

After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures:

SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45

Returns different results for MySQL than other engines. However, the similar query:

SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30

Returns the same results.

This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function.

* linter is back!

* code review

* remove now unused option

* Fix newline at end of files

* more unused code

* update to master

* check for matching ids before query

* Update models/issue_label.go

Co-Authored-By: 6543 <6543@obermui.de>

* Update models/issue_label.go

* update comments

* Update routers/org/setting.go

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2020-04-01 01:14:46 -03:00
GiteaBot bdfe4e258f [skip ci] Updated translations via Crowdin 2020-03-30 05:32:25 +00:00
GiteaBot 29ed07ee02 [skip ci] Updated translations via Crowdin 2020-03-29 19:53:00 +00:00
zeripath 20d4f9206d
Change the order of issues.closed_by to list opening user first (#10876)
Fix #8266

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-03-29 13:09:23 -03:00
S7evinK 828a27feeb
Add Matrix webhook (#10831)
* Add Matrix webhook

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Add template and related translations for Matrix hook

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Add actual webhook routes and form

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Add missing file

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Update modules/webhook/matrix_test.go

* Use stricter regex to replace URLs

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Escape url and text

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Remove unnecessary whitespace

* Fix copy and paste mistake

Co-Authored-By: Tulir Asokan <tulir@maunium.net>

* Fix indention inconsistency

* Use Authorization header instead of url parameter

* Add raw commit information to webhook

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2020-03-28 15:09:55 +02:00
GiteaBot 7e8ced07b3 [skip ci] Updated translations via Crowdin 2020-03-27 21:28:54 +00:00
Lauris BH bbd910ed1b
Allow to set protected file patterns that can not be changed under no conditions (#10806)
Co-Authored-By: zeripath <art27@cantab.net>
2020-03-27 00:26:34 +02:00
GiteaBot b10cb7b258 [skip ci] Updated translations via Crowdin 2020-03-25 13:34:32 +00:00
GiteaBot 288e487232 [skip ci] Updated translations via Crowdin 2020-03-09 19:57:34 +00:00
GiteaBot 8a0da9ea78 [skip ci] Updated translations via Crowdin 2020-03-08 23:42:21 +00:00
James Lakin a9f4489bbc
System-wide webhooks (#10546)
* Create system webhook column (and migration)

* Create system webhook DB methods

Based on the default webhook ones

* Modify router to handle system webhooks and default ones

* Remove old unused admin nav template

* Adjust orgRepoCtx to differentiate system and default webhook URLs

* Assign IsSystemWebhook when creating webhooks

* Correctly use booleans for IsSystemWebhook

* Use system webhooks when preparing webhooks for payload

* Add UI and locale changes

* Use router params to differentiate admin hook pages

* Fix deleting admin webhooks and rename method

* Add clarity to webhook docs

* Revert "Remove old unused admin nav template"

This reverts commit 191a20a7389fe5f6256b0ad6aafd04b9b0e295c5.

* Rename WebHooksNewPost to GiteaHooksNewPost for clarity

* Reintroduce blank line lost during merge conflict

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-03-09 00:08:05 +02:00
GiteaBot 1966f421b3 [skip ci] Updated translations via Crowdin 2020-03-08 13:36:49 +00:00
GiteaBot 4901096842 [skip ci] Updated translations via Crowdin 2020-03-07 21:07:35 +00:00
GiteaBot cf7d4109c9 [skip ci] Updated translations via Crowdin 2020-03-06 06:50:20 +00:00
John Olheiser 3f1c0841cb
Granular webhook events (#9626)
* Initial work

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add PR reviews and API coverage

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Split up events

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add migration and locale

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Format

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Revert IsPull

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix comments

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix PR reviews

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix issue_comment

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Make fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Migrations

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Backwards compatible API

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix feishu

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move session commit

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-03-06 07:10:48 +02:00
zeripath 80db44267c
Add Approval Counts to pulls list (#10238)
* Add Approval Counts to pulls list

Add simple approvals counts to pulls lists

* Remove non-official counts

* Add PR features to milestone_issues.tmpl
2020-03-06 03:44:06 +00:00
Lauris BH 37c3db7be6
Add restricted user filter to LDAP authentication (#10600)
* Add restricted user filter to LDAP authentification

* Fix unit test cases
2020-03-05 08:30:33 +02:00
Lauris BH 3d5d21133c
OAuth2: add Yandex provider (#8335) (#10564)
* OAuth2: add Yandex provider (#8335)

* remove changes from locale ru-RU

* fmt modules/auth/oauth2/oauth2.go

Co-Authored-By: 6543 <6543@obermui.de>

* fix fmt

* Update templates/admin/auth/new.tmpl

* fix fmt

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-03-05 00:08:52 +02:00
GiteaBot 0e304bbc42 [skip ci] Updated translations via Crowdin 2020-03-03 19:53:16 +00:00
Felix W. Dekker aa4a297c16
Rename repo size sorting options (#10587) 2020-03-03 14:27:38 -03:00
techknowlogick bea497ff96
nextcloud oauth (#10562)
Fix #7078
2020-03-02 22:11:45 -05:00
GiteaBot 22b7507024 [skip ci] Updated translations via Crowdin 2020-03-02 20:56:37 +00:00
guillep2k 5e1438ba92
Admin page for managing user e-mail activation (#10557)
* Implement mail activation admin panel

* Add export comments

* Fix another export comment

* again...

* And again!

* Apply suggestions by @lunny

* Add UI for user activated emails

* Make new activation UI work

* Fix lint

* Prevent admin from self-deactivate; add modal

Co-authored-by: zeripath <art27@cantab.net>
2020-03-02 15:25:36 -03:00
GiteaBot b5ecc82d6e [skip ci] Updated translations via Crowdin 2020-03-02 15:54:56 +00:00
zeripath 90919bb37e
Show Signer in commit lists and add basic trust (#10425)
* Show Signer in commit lists and add basic trust

Show the avatar of the signer in the commit list pages as we do not
enforce that the signer is an author or committer. This makes it
clearer who has signed the commit.

Also display commits signed by non-members differently from
members and in particular make it clear when a non-member signer
is different from the committer to help reduce the risk of
spoofing.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* ensure orange text and background is available

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update gpg_key.go

* Update models/gpg_key.go

* Apply suggestions from code review

* Require team collaborators to have access to UnitTypeCode

* as per @6543

* fix position of sha as per @silverwind

* as per @guillep2k
2020-02-27 16:20:55 -03:00
GiteaBot 804d9ffa9f [skip ci] Updated translations via Crowdin 2020-02-25 16:01:35 +00:00
GiteaBot 6baa07ddf3 [skip ci] Updated translations via Crowdin 2020-02-24 22:53:36 +00:00
guillep2k 09dbd85a3a
Various fixes in login sources (#10428) 2020-02-23 13:52:05 -06:00
zeripath 089ccb0c80
Handle push rejection message in Merge & Web Editor (#10373)
* Handle push rejection message in Merge

* placate golangci-lint

* Fix sanitize, adjust message handling

* oops

* Oops

* Handle push-rejection in webeditor CRUD too

* Apply suggestions from code review

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-02-22 15:08:48 +02:00
zeripath c8d1c38129
Render READMEs in docs/ .gitea or .github from root (#10361)
* Render READMEs in docs/ .gitea or .github from root
2020-02-21 17:04:20 -06:00
GiteaBot 6b019724f3 [skip ci] Updated translations via Crowdin 2020-02-21 18:19:29 +00:00
GiteaBot 872f832a1a [skip ci] Updated translations via Crowdin 2020-02-20 21:04:58 +00:00
Lauris BH 3c45cf8494
Add detected file language to code search (#10256)
Move langauge detection to separate module to be more reusable

Add option to disable vendored file exclusion from file search

Allways show all language stats for search
2020-02-20 16:53:55 -03:00
GiteaBot f0a43a068f [skip ci] Updated translations via Crowdin 2020-02-18 06:11:13 +00:00
GiteaBot 83801663ce [skip ci] Updated translations via Crowdin 2020-02-18 03:17:09 +00:00
GiteaBot 7af6f8b465 [skip ci] Updated translations via Crowdin 2020-02-16 21:43:17 +00:00
GiteaBot 78859ba274 [skip ci] Updated translations via Crowdin 2020-02-15 18:47:31 +00:00
GiteaBot a97fe76950 [skip ci] Updated translations via Crowdin 2020-02-14 12:44:14 +00:00
GiteaBot ff261dafc4 [skip ci] Updated translations via Crowdin 2020-02-14 03:09:58 +00:00
GiteaBot 908f8952be [skip ci] Updated translations via Crowdin 2020-02-12 19:33:28 +00:00
Lunny Xiao 83a8944fcf
Add feishu webhook support (#10229)
Add feishu webhook support
2020-02-12 08:48:28 +00:00
GiteaBot 685a0037d2 [skip ci] Updated translations via Crowdin 2020-02-12 01:54:51 +00:00
GiteaBot e704f7fae7 [skip ci] Updated translations via Crowdin 2020-02-11 15:44:26 +00:00
Lauris BH ad2642a8aa
Language statistics bar for repositories (#8037)
* Implementation for calculating language statistics

Impement saving code language statistics to database

Implement rendering langauge stats

Add primary laguage to show in repository list

Implement repository stats indexer queue

Add indexer test

Refactor to use queue module

* Do not timeout for queues
2020-02-11 11:34:17 +02:00
GiteaBot b3255921af [skip ci] Updated translations via Crowdin 2020-02-10 23:07:55 +00:00
GiteaBot 26eaebf4de [skip ci] Updated translations via Crowdin 2020-02-10 19:26:08 +00:00
guillep2k 069a96ebe2
Improve 404 error message (#10214) 2020-02-10 21:23:35 +02:00
GiteaBot e414fc18a9 [skip ci] Updated translations via Crowdin 2020-02-09 20:20:33 +00:00
GiteaBot 11995bf2ee [skip ci] Updated translations via Crowdin 2020-02-07 17:11:26 +00:00
James Lakin 6e6da2c276
Tweak locale to respect singular conflicting file message in P… (#10177)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-02-07 17:38:18 +01:00
GiteaBot 77431599f6 [skip ci] Updated translations via Crowdin 2020-02-05 09:48:57 +00:00
GiteaBot 7dcd305424 [skip ci] Updated translations via Crowdin 2020-02-04 14:28:42 +00:00
James Lakin 3ff95cef60
Show if a PR has conflicting files on the PR lists (#10130)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-02-04 00:14:38 +02:00
Lauris BH 20c513be6e
Show download count info in release list (#10124)
* Show download count info in release list

* Use go-humanize
2020-02-03 21:50:37 +02:00
GiteaBot 29151b90c6 [skip ci] Updated translations via Crowdin 2020-02-03 08:48:26 +00:00
GiteaBot 68e4f4efc7 [skip ci] Updated translations via Crowdin 2020-01-30 16:12:42 +00:00
zeripath c01221e70f
Queue: Make WorkerPools and Queues flushable (#10001)
* Make WorkerPools and Queues flushable

Adds Flush methods to Queues and the WorkerPool
Further abstracts the WorkerPool
Adds a final step to Flush the queues in the defer from PrintCurrentTest
Fixes an issue with Settings inheritance in queues

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Change to for loop

* Add IsEmpty and begin just making the queues composed WorkerPools

* subsume workerpool into the queues and create a flushable interface

* Add manager command

* Move flushall to queue.Manager and add to testlogger

* As per @guillep2k

* as per @guillep2k

* Just make queues all implement flushable and clean up the wrapped queue flushes

* cope with no timeout

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-28 20:01:06 -05:00
GiteaBot 4377e14304 [skip ci] Updated translations via Crowdin 2020-01-27 22:38:55 +00:00
GiteaBot 3c8a5d8783 [skip ci] Updated translations via Crowdin 2020-01-27 16:27:13 +00:00
GiteaBot a83c373641 [skip ci] Updated translations via Crowdin 2020-01-25 19:02:32 +00:00
GiteaBot f1dd38b4f5 [skip ci] Updated translations via Crowdin 2020-01-25 14:50:55 +00:00
GiteaBot cb8f0c22a0 [skip ci] Updated translations via Crowdin 2020-01-25 13:22:15 +00:00
GiteaBot 89f7dcb13d [skip ci] Updated translations via Crowdin 2020-01-25 06:20:28 +00:00
GiteaBot 9d5756989a [skip ci] Updated translations via Crowdin 2020-01-25 02:49:08 +00:00
GiteaBot 333401e0fd [skip ci] Updated translations via Crowdin 2020-01-24 18:03:57 +00:00
GiteaBot 608cd58db6 [skip ci] Updated translations via Crowdin 2020-01-22 21:26:56 +00:00
GiteaBot 2ff2cddd16 [skip ci] Updated translations via Crowdin 2020-01-22 20:57:03 +00:00
GiteaBot 0e8b27afe8 [skip ci] Updated translations via Crowdin 2020-01-21 16:27:57 +00:00
GiteaBot 3f1c8970ec [skip ci] Updated translations via Crowdin 2020-01-21 10:21:24 +00:00
GiteaBot e7322a1138 [skip ci] Updated translations via Crowdin 2020-01-20 23:35:43 +00:00
GiteaBot 1920e5bcaf [skip ci] Updated translations via Crowdin 2020-01-20 15:46:46 +00:00
guillep2k ad1b6d439f Add support for database schema in PostgreSQL (#8819)
* Add support for database schema

* Require setting search_path for the db user

* Add schema setting to admin/config.tmpl

* Use a schema different from default for psql tests

* Update postgres scripts to use custom schema

* Update to xorm/core 0.7.3 and xorm/xorm c37aff9b3a

* Fix migration test

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-20 16:45:14 +01:00
zeripath c5014a7f2c Add option to prevent LDAP from deactivating everything on empty search (#9879)
* Add option to prevent LDAP from deactivating everything on empty search

* Update options/locale/locale_en-US.ini

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-20 11:47:39 +08:00
GiteaBot 1803b38efc [skip ci] Updated translations via Crowdin 2020-01-19 09:19:29 +00:00
GiteaBot 20f6acc585 [skip ci] Updated translations via Crowdin 2020-01-19 06:44:47 +00:00
GiteaBot 5a02ed5894 [skip ci] Updated translations via Crowdin 2020-01-17 18:35:33 +00:00
GiteaBot 7c0570d214 [skip ci] Updated translations via Crowdin 2020-01-17 10:24:56 +00:00
David Svantesson 3c07d03c03 Add setting to set default and global disabled repository units. (#8788)
* Add possibility to global disable repo units.

* Add Default Repo Unit app.ini setting.

* Hide units

* Hide disabled repo units

* Minor fixes

* Indicate disabled units in team settings.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-01-17 09:34:37 +02:00
6543 36943e56d6 Add "Update Branch" button to Pull Requests (#9784)
* add Divergence

* add Update Button

* first working version

* re-use code

* split raw merge commands and db-change functions (notify, cache, ...)

* use rawMerge (remove redundant code)

* own function to get Diverging of PRs

* use FlashError

* correct Error Msg

* hook is triggerd ... so remove comment

* add "branch2" to "user2/repo1" because it unit-test "TestPullView_ReviewerMissed" use it but dont exist jet :/

* move GetPerm to IsUserAllowedToUpdate

* add Flash Success MSG

* imprufe code
- remove useless js chage

* fix-lint

* TEST: add PullRequest ID:5
Repo: user2/repo1
Base: branch1
Head: pr-to-update

* correct comments

* make PR5 outdated

* fix Tests

* WIP: add pull update test

* update revs

* update locales

* working TEST

* update UI

* misspell

* change style

* add 1s delay so rev exist

* move row up (before merge row)

* fix lint nit

* UI remove divider

* Update style

* nits

* do it right

* introduce IsSameRepo

* remove useless check

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-17 08:03:40 +02:00
GiteaBot fdb32ab0f8 [skip ci] Updated translations via Crowdin 2020-01-16 14:22:28 +00:00
GiteaBot 3ac79b7101 [skip ci] Updated translations via Crowdin 2020-01-15 11:16:35 +00:00
GiteaBot 4e566df1c6 [skip ci] Updated translations via Crowdin 2020-01-15 09:56:33 +00:00
Bagas Sanjaya 3f1e062d21 err_admin_name_pattern_not_allowed String Clarification (#9731)
* err_admin_name_pattern_not_allowed clarification edit

* Apply suggestion from @zeripath

Context: username that provided as admin

Co-Authored-By: zeripath <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-01-15 10:53:30 +01:00
zeripath 66ee9b87f9 Add require signed commit for protected branch (#9708)
* Add require signed commit for protected branch

* Fix fmt

* Make editor show if they will be signed

* bugfix

* Add basic merge check and better information for CRUD

* linting comment

* Add descriptors to merge signing

* Slight refactor

* Slight improvement to appearances

* Handle Merge API

* manage CRUD API

* Move error to error.go

* Remove fix to delete.go

* prep for merge

* need to tolerate \r\n in message

* check protected branch before trying to load it

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* fix commit-reader

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-01-15 09:32:57 +01:00
GiteaBot 7e44995a51 [skip ci] Updated translations via Crowdin 2020-01-15 04:34:53 +00:00
GiteaBot 324672106b [skip ci] Updated translations via Crowdin 2020-01-15 03:55:40 +00:00
GiteaBot 9eb6793576 [skip ci] Updated translations via Crowdin 2020-01-15 00:08:04 +00:00
GiteaBot a8da7b3b8c [skip ci] Updated translations via Crowdin 2020-01-14 12:54:26 +00:00
GiteaBot 35efc7ba4f [skip ci] Updated translations via Crowdin 2020-01-14 10:31:54 +00:00
GiteaBot bca367cecc [skip ci] Updated translations via Crowdin 2020-01-14 00:08:14 +00:00
Manush Dodunekov 1751d5fcf2 Restricted users (#6274)
* Restricted users (#4334): initial implementation

* Add User.IsRestricted & UI to edit it

* Pass user object instead of user id to places where IsRestricted flag matters

* Restricted users: maintain access rows for all referenced repos (incl public)

* Take logged in user & IsRestricted flag into account in org/repo listings, searches and accesses

* Add basic repo access tests for restricted users

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* Mention restricted users in the faq

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* Revert unnecessary change `.isUserPartOfOrg` -> `.IsUserPartOfOrg`

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* Remove unnecessary `org.IsOrganization()` call

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* Revert to an `int64` keyed `accessMap`

* Add type `userAccess`
* Add convenience func updateUserAccess()
* Turn accessMap into a `map[int64]userAccess`

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* or even better: `map[int64]*userAccess`

* updateUserAccess(): use tighter syntax as suggested by lafriks

* even tighter

* Avoid extra loop

* Don't disclose limited orgs to unauthenticated users

* Don't assume block only applies to orgs

* Use an array of `VisibleType` for filtering

* fix yet another thinko

* Ok - no need for u

* Revert "Ok - no need for u"

This reverts commit 5c3e886aabd5acd997a3b35687d322439732c200.

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-13 18:33:46 +01:00
GiteaBot b7ffc6a096 [skip ci] Updated translations via Crowdin 2020-01-13 14:10:01 +00:00
GiteaBot bd9d480f99 [skip ci] Updated translations via Crowdin 2020-01-13 10:42:46 +00:00
GiteaBot 625057c674 [skip ci] Updated translations via Crowdin 2020-01-12 16:34:48 +00:00
GiteaBot 497e15fdc2 [skip ci] Updated translations via Crowdin 2020-01-12 12:12:40 +00:00
GiteaBot f2e6c4538e [skip ci] Updated translations via Crowdin 2020-01-11 10:51:31 +00:00
David Svantesson 32fb813133 Allow repo admin to merge PR regardless of review status (#9611)
* Allow repo admin to merge even if review is not ok.
2020-01-11 02:29:34 -05:00
GiteaBot a311ace354 [skip ci] Updated translations via Crowdin 2020-01-09 16:43:29 +00:00
GiteaBot 71fe018977 [skip ci] Updated translations via Crowdin 2020-01-09 11:58:47 +00:00
David Svantesson 25531c71a7 Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532)
Fix #5997.

If a push causes the patch/diff of a PR towards target branch to change, all existing reviews for the PR will be set and shown as stale.
New branch protection option to dismiss stale approvals are added.
To show that a review is not based on the latest PR changes, an hourglass is shown
2020-01-09 01:47:45 +00:00
GiteaBot 98772d376c [skip ci] Updated translations via Crowdin 2020-01-08 12:45:05 +00:00
GiteaBot b6fa229dcf [skip ci] Updated translations via Crowdin 2020-01-07 14:32:33 +00:00
GiteaBot c88f0fed36 [skip ci] Updated translations via Crowdin 2020-01-07 11:24:19 +00:00
zeripath 62eb1b0f25 Graceful Queues: Issue Indexing and Tasks (#9363)
* Queue: Add generic graceful queues with settings

* Queue & Setting: Add worker pool implementation

* Queue: Add worker settings

* Queue: Make resizing worker pools

* Queue: Add name variable to queues

* Queue: Add monitoring

* Queue: Improve logging

* Issues: Gracefulise the issues indexer

Remove the old now unused specific queues

* Task: Move to generic queue and gracefulise

* Issues: Standardise the issues indexer queue settings

* Fix test

* Queue: Allow Redis to connect to unix

* Prevent deadlock during early shutdown of issue indexer

* Add MaxWorker settings to queues

* Merge branch 'master' into graceful-queues

* Update modules/indexer/issues/indexer.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Update modules/indexer/issues/indexer.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Update modules/queue/queue_channel.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Update modules/queue/queue_disk.go

* Update modules/queue/queue_disk_channel.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Rename queue.Description to queue.ManagedQueue as per @guillep2k

* Cancel pool workers when removed

* Remove dependency on queue from setting

* Update modules/queue/queue_redis.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* As per @guillep2k add mutex locks on shutdown/terminate

* move unlocking out of setInternal

* Add warning if number of workers < 0

* Small changes as per @guillep2k

* No redis host specified not found

* Clean up documentation for queues

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

* Update modules/indexer/issues/indexer_test.go

* Ensure that persistable channel queue is added to manager

* Rename QUEUE_NAME REDIS_QUEUE_NAME

* Revert "Rename QUEUE_NAME REDIS_QUEUE_NAME"

This reverts commit 1f83b4fc9b9dabda186257b38c265fe7012f90df.

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-01-07 12:23:09 +01:00
GiteaBot f71e1c8e79 [skip ci] Updated translations via Crowdin 2020-01-07 07:40:50 +00:00
GiteaBot 5749b26cdd [skip ci] Updated translations via Crowdin 2020-01-06 16:52:05 +00:00
GiteaBot 444c3a1184 [skip ci] Updated translations via Crowdin 2020-01-05 14:30:20 +00:00
GiteaBot 6a5a2f493a [skip ci] Updated translations via Crowdin 2020-01-04 22:21:24 +00:00
GiteaBot 07439d8059 [skip ci] Updated translations via Crowdin 2020-01-04 20:29:45 +00:00
Lauris BH 2b8b0f66ed Add translatable Powered by Gitea text in footer (#9600) 2020-01-04 20:27:19 +00:00
GiteaBot 4a768e1c3e [skip ci] Updated translations via Crowdin 2020-01-03 18:44:08 +00:00
David Svantesson ea707f5a77 Add branch protection option to block merge on requested changes. (#9592)
* Add branch protection option to block merge on requested changes.

* Add migration step

* Fix check to correct negation

* Apply suggestions from code review

Language improvement.

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Copyright year.

Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-03 19:47:09 +02:00
GiteaBot 09bf77bc4f [skip ci] Updated translations via Crowdin 2020-01-02 12:18:28 +00:00
GiteaBot b983ff4473 [skip ci] Updated translations via Crowdin 2019-12-30 17:14:49 +00:00
GiteaBot ae9d342f54 [skip ci] Updated translations via Crowdin 2019-12-29 12:34:39 +00:00
GiteaBot a70e822100 [skip ci] Updated translations via Crowdin 2019-12-28 23:35:29 +00:00
techknowlogick 1ea447aedf Delete conflicting file (#9526)
Case collision with other jboss file

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2019-12-28 10:43:03 +00:00
6543 f2d03cda96 [API] Extend times API (#9200)
Extensively extend the times API.

close #8833; close #8513; close #8559
2019-12-27 20:30:58 +00:00
John Olheiser 546523a57c Delete extra Matlab ignore file (#9479) 2019-12-23 23:31:36 +00:00
John Olheiser 071e7c4f0a Update matlab gitignore? (#9478)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-12-23 20:45:43 +00:00
GiteaBot 2de8b27dd1 [skip ci] Updated translations via Crowdin 2019-12-23 12:34:47 +00:00
mrsdizzie 1df701fd1a Add ActionCommentPull action (#9456)
* Add ActionCommentPull action

Adds ActionCommentPull action to distinguish between a comment on an
issue and on a pull request

* Update modules/notification/action/action.go

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2019-12-22 08:29:26 +00:00
GiteaBot a13654562c [skip ci] Updated translations via Crowdin 2019-12-20 17:10:13 +00:00
Antoine GIRARD e2fc0a0dfd chore: update license list (#9436)
go run scripts/generate-licenses.go

Co-authored-by: zeripath <art27@cantab.net>
2019-12-20 08:17:25 +08:00
Antoine GIRARD db5524a9ab chore: update gitignore list (#9437)
Updated the gitignore list with the command : `go run scripts/generate-gitignores.go`
2019-12-19 23:04:12 +00:00
GiteaBot d9a0ba2cac [skip ci] Updated translations via Crowdin 2019-12-19 21:50:14 +00:00
GiteaBot 3b4682e172 [skip ci] Updated translations via Crowdin 2019-12-18 12:33:32 +00:00
GiteaBot c939d610b9 [skip ci] Updated translations via Crowdin 2019-12-18 10:02:07 +00:00
GiteaBot 669791be99 [skip ci] Updated translations via Crowdin 2019-12-18 04:02:12 +00:00
GiteaBot 4714fa6642 [skip ci] Updated translations via Crowdin 2019-12-16 15:57:59 +00:00
Mario Lubenka 61db834904 Change target branch for pull request (#6488)
* Adds functionality to change target branch of created pull requests

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use const instead of var in JavaScript additions

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Check if branches are equal and if PR already exists before changing target branch

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Make sure to check all commits

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Print error messages for user as error flash message

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Disallow changing target branch of closed or merged pull requests

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Resolve conflicts after merge of upstream/master

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Change order of branch select fields

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes duplicate check

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use ctx.Tr for translations

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Recompile JS

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use correct translation namespace

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Remove redundant if condition

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Moves most change branch logic into pull service

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Completes comment

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Add Ref to ChangesPayload for logging changed target branches
instead of creating a new struct

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Revert changes to go.mod

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Directly use createComment method

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Return 404 if pull request is not found. Move written check up

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Remove variable declaration

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Return client errors on change pull request target errors

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Return error in commit.HasPreviousCommit

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adds blank line

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Test patch before persisting new target branch

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Update patch before testing (not working)

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes patch calls when changeing pull request target

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes unneeded check for base name

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Moves ChangeTargetBranch completely to pull service. Update patch status.

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Set webhook mode after errors were validated

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Update PR in one transaction

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Move logic for check if head is equal with branch to pull model

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adds missing comment and simplify return

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adjust CreateComment method call

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
2019-12-16 14:20:25 +08:00
Brad Albright f6b29012e0 Add /milestones endpoint (#8733)
Create a /milestones endpoint which basically serves as a dashboard view for milestones, very similar to the /issues or /pulls page.

Closes #8232
2019-12-15 14:20:08 +00:00
GiteaBot 47c24be293 [skip ci] Updated translations via Crowdin 2019-12-14 17:32:24 +00:00
zeripath dc2fe9801f Make repository management section handle lfs locks (#8726)
* Make repository maangement section handle lfs locks

* Add check attribute handling and handle locking paths better

* More cleanly check-attributes

* handle error

* Check if file exists in default branch before linking to it.

* fixup

* Properly cleanPath

* Use cleanPath

* Sigh
2019-12-12 21:18:07 +08:00
GiteaBot baf089e5b9 [skip ci] Updated translations via Crowdin 2019-12-08 16:59:29 +00:00
GiteaBot 15254f5762 [skip ci] Updated translations via Crowdin 2019-12-08 02:53:56 +00:00
GiteaBot 0e56337f64 [skip ci] Updated translations via Crowdin 2019-12-07 15:54:45 +00:00
GiteaBot eba816e826 [skip ci] Updated translations via Crowdin 2019-12-06 19:16:21 +00:00
GiteaBot 43f7b97c4a [skip ci] Updated translations via Crowdin 2019-12-05 17:21:04 +00:00
GiteaBot 7ccaf54140 [skip ci] Updated translations via Crowdin 2019-12-04 01:42:09 +00:00
David Svantesson bac4b78e09 Branch protection: Possibility to not use whitelist but allow anyone with write access (#9055)
* Possibility to not use whitelist but allow anyone with write access

* fix existing test

* rename migration function

* Try to give a better name for migration step

* Clear settings if higher level setting is not set

* Move official reviews to db instead of counting approvals each time

* migration

* fix

* fix migration

* fix migration

* Remove NOT NULL from EnableWhitelist as migration isn't possible

* Fix migration, reviews are connected to issues.

* Fix SQL query issues in GetReviewersByPullID.

* Simplify function GetReviewersByIssueID

* Handle reviewers that has been deleted

* Ensure reviews for test is in a well defined order

* Only clear and set official reviews when it is an approve or reject.
2019-12-03 20:08:56 -05:00
GiteaBot 18236973e9 [skip ci] Updated translations via Crowdin 2019-12-03 13:08:09 +00:00
GiteaBot a00d7200b1 [skip ci] Updated translations via Crowdin 2019-12-02 18:35:05 +00:00
GiteaBot 33fc48c8ae [skip ci] Updated translations via Crowdin 2019-12-02 14:45:50 +00:00
GiteaBot 674bc772fb [skip ci] Updated translations via Crowdin 2019-12-01 13:59:18 +00:00
zeripath 60c5339042 Graceful: Cancel Process on monitor pages & HammerTime (#9213)
* Graceful: Create callbacks to with contexts

* Graceful: Say when Gitea is completely finished

* Graceful: Git and Process within HammerTime

Force all git commands to terminate at HammerTime
Force all process commands to terminate at HammerTime
Move almost all git processes to run as git Commands

* Graceful: Always Hammer after Shutdown

* ProcessManager: Add cancel functionality

* Fix tests

* Make sure that process.Manager.Kill() cancels

* Make threadsafe access to Processes and remove own unused Kill

* Remove cmd from the process manager as it is no longer used

* the default context is the correct context

* get rid of double till
2019-11-30 16:40:22 +02:00
GiteaBot b50dee5a61 [skip ci] Updated translations via Crowdin 2019-11-27 00:53:49 +00:00
John Olheiser 62bcb2b7f1 Add avatar and issue labels to template repositories (#9149)
* Add avatar and issue labels

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix redundant if-err

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-25 13:17:51 +08:00
John Olheiser e84326aaec Add git hooks and webhooks to template repositories; move to services (#8926)
* Add git hooks and webhooks to template options

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update models/repo.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Add tooltip if the user can't edit git hooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Close repositories after copying git hooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Wording

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Restructure for services

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Return errors

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move GenerateRepository to using a DBContext

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Wrap with models.WithTx

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Remove debug print

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move if-error-delete-repo outside WithTx

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Return nil if no repo generated

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-24 12:57:52 -05:00
GiteaBot e6036d9899 [skip ci] Updated translations via Crowdin 2019-11-23 15:05:14 +00:00
QuaSoft 7b4d2f7a2a Add single sign-on support via SSPI on Windows (#8463)
* Add single sign-on support via SSPI on Windows

* Ensure plugins implement interface

* Ensure plugins implement interface

* Move functions used only by the SSPI auth method to sspi_windows.go

* Field SSPISeparatorReplacement of AuthenticationForm should not be required via binding, as binding will insist the field is non-empty even if another login type is selected

* Fix breaking of oauth authentication on download links. Do not create new session with SSPI authentication on download links.

* Update documentation for the new 'SPNEGO with SSPI' login source

* Mention in documentation that ROOT_URL should contain the FQDN of the server

* Make sure that Contexter is not checking for active login sources when the ORM engine is not initialized (eg. when installing)

* Always initialize and free SSO methods, even if they are not enabled, as a method can be activated while the app is running (from Authentication sources)

* Add option in SSPIConfig for removing of domains from logon names

* Update helper text for StripDomainNames option

* Make sure handleSignIn() is called after a new user object is created by SSPI auth method

* Remove default value from text of form field helper

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Remove default value from text of form field helper

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Remove default value from text of form field helper

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Only make a query to the DB to check if SSPI is enabled on handlers that need that information for templates

* Remove code duplication

* Log errors in ActiveLoginSources

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Revert suffix of randomly generated E-mails for Reverse proxy authentication

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Revert unneeded white-space change in template

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Add copyright comments at the top of new files

* Use loopback name for randomly generated emails

* Add locale tag for the SSPISeparatorReplacement field with proper casing

* Revert casing of SSPISeparatorReplacement field in locale file, moving it up, next to other form fields

* Update docs/content/doc/features/authentication.en-us.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Remove Priority() method and define the order in which SSO auth methods should be executed in one place

* Log authenticated username only if it's not empty

* Rephrase helper text for automatic creation of users

* Return error if more than one active SSPI auth source is found

* Change newUser() function to return error, letting caller log/handle the error

* Move isPublicResource, isPublicPage and handleSignIn functions outside SSPI auth method to allow other SSO methods to reuse them if needed

* Refactor initialization of the list containing SSO auth methods

* Validate SSPI settings on POST

* Change SSPI to only perform authentication on its own login page, API paths and download links. Leave Toggle middleware to redirect non authenticated users to login page

* Make 'Default language' in SSPI config empty, unless changed by admin

* Show error if admin tries to add a second authentication source of type SSPI

* Simplify declaration of global variable

* Rebuild gitgraph.js on Linux

* Make sure config values containing only whitespace are not accepted
2019-11-23 01:33:31 +02:00
GiteaBot cbd2bebec0 [skip ci] Updated translations via Crowdin 2019-11-22 14:54:19 +00:00
GiteaBot 513b9fc988 [skip ci] Updated translations via Crowdin 2019-11-22 07:02:24 +00:00
GiteaBot dfd8b94923 [skip ci] Updated translations via Crowdin 2019-11-20 11:58:10 +00:00
David Svantesson 69a255defb Team permission to create repository in organization (#8312)
* Add team permission setting to allow creating repo in organization.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add test case for creating repo when have team creation access.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* build error: should omit comparison to bool constant

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add comment on exported functions

* Fix fixture consistency, fix existing unit tests

* Fix boolean comparison in xorm query.

* addCollaborator and changeCollaborationAccessMode separate steps

More clear to use different if-cases.

* Create and commit xorm session

* fix

* Add information of create repo permission in team sidebar

* Add migration step

* Clarify that repository creator will be administrator.

* Fix some things after merge

* Fix language text that use html

* migrations file

* Create repository permission -> Create repositories

* fix merge

* fix review comments
2019-11-20 19:27:49 +08:00
GiteaBot a88a58a83e [skip ci] Updated translations via Crowdin 2019-11-20 05:34:34 +00:00
GiteaBot 108bed2023 [skip ci] Updated translations via Crowdin 2019-11-20 00:16:19 +00:00
GiteaBot 4a357f4188 [skip ci] Updated translations via Crowdin 2019-11-19 23:06:30 +00:00
guillep2k c57edb6c7b Add password requirement info on error (#9074)
* Add password requirement info on error

* Move BuildComplexityError to the password pkg

* Unexport complexity type

* Fix extra line

* Update modules/password/password.go

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-11-19 22:44:58 +00:00
John Olheiser eb0359cad4 Context menus for comments (#9043)
* Add quote replies

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-19 20:33:42 +02:00
GiteaBot af7f08bca8 [skip ci] Updated translations via Crowdin 2019-11-19 07:37:59 +00:00
Iwasa Kazmi 5a3af7992c fix placeholders in the error message (#9060) 2019-11-19 07:35:37 +00:00
GiteaBot 9ccb50f162 [skip ci] Updated translations via Crowdin 2019-11-19 00:06:09 +00:00
GiteaBot d338e8238f [skip ci] Updated translations via Crowdin 2019-11-18 17:06:44 +00:00
guillep2k b15f26b1cf Close/reopen issues by keywords in titles and comments (#8866)
* Add close/reopen from comment functionality

* Fix comment

* Rewrite closing/reopening template

* Check xref permissions, move action to services/pull

* Fix RefIsPull field

* Add xref tests

* Fix xref unique filter

* Only highlight keywords for actionable xrefs

* Fix xref neuter filter

* Fix check return status

* Restart CI
2019-11-18 15:13:07 +02:00
GiteaBot ba4e8f221b [skip ci] Updated translations via Crowdin 2019-11-18 01:29:04 +00:00
GiteaBot 06984bbcbf [skip ci] Updated translations via Crowdin 2019-11-17 19:44:07 +00:00
GiteaBot 9275390423 [skip ci] Updated translations via Crowdin 2019-11-17 14:13:14 +00:00
GiteaBot 8f09aff427 [skip ci] Updated translations via Crowdin 2019-11-17 06:31:35 +00:00
John Olheiser 06a8504c78 Update dashboard context for PR reviews (#8995)
* Update dashboard context for PR reviews

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update options/locale/locale_en-US.ini

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Only append head action if it has content or is approval/rejection

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update options/locale/locale_en-US.ini

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-11-15 00:52:18 +01:00
GiteaBot 1716150ced [skip ci] Updated translations via Crowdin 2019-11-14 08:01:32 +00:00
GiteaBot 71395dffd0 [skip ci] Updated translations via Crowdin 2019-11-13 13:16:43 +00:00
GiteaBot be869e8881 [skip ci] Updated translations via Crowdin 2019-11-13 07:22:32 +00:00
Antoine GIRARD cda8de2004 Show repository size in repo home page and settings (#8940)
* feat: display repository size on repo home and settings

* refactor: move repo size up in setting page
2019-11-13 00:45:19 +00:00
GiteaBot fd1b2a31f3 [skip ci] Updated translations via Crowdin 2019-11-12 22:51:56 +00:00
guillep2k 4b3fc74937 Fix spelling as suggested by @rmbleeker (#8934) 2019-11-12 10:47:29 -05:00
GiteaBot a0d4014517 [skip ci] Updated translations via Crowdin 2019-11-12 08:36:01 +00:00
GiteaBot 555b1f6581 [skip ci] Updated translations via Crowdin 2019-11-11 17:09:24 +00:00
GiteaBot 561044e422 [skip ci] Updated translations via Crowdin 2019-11-11 15:19:00 +00:00
John Olheiser 74a6add4d9 Template Repositories (#8768)
* Start work on templates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Continue work

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix IsTemplate vs IsGenerated

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix tabs vs spaces

* Tabs vs Spaces

* Add templates to API & start adding tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix integration tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Remove unused User

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move template tests to existing repos

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Minor re-check updates and cleanup

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* make fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Test cleanup

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix optionalbool

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* make fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Test fixes and icon change

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add new user and repo for tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix tests (finally)

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update meta repo with env variables

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move generation to create page

Combine with repo create template
Modify API search to prioritize owner for repo

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix tests and coverage

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix swagger and JS lint

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix API searching for own private repos

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Change wording

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix repo search test. User had a private repo that didn't show up

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Another search test fix

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Clarify git content

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Feedback updates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add topics WIP

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Finish adding topics

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update locale

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-11 23:15:29 +08:00
zeripath 8eeb2877d5
Adjust error reporting from merge failures and use LC_ALL=C for git (#8548)
There are two major components to this PR:

* This PR handles merge and rebase failures from merging a little more nicely with Flash errors rather a 500.
* All git commands are run in the LC_ALL="C" environment to ensure that error messages are in English. This DefaultLocale is defined in a way that if necessary (due to platform weirdness) it can be overridden at build time using LDFLAGS="-X "code.gitea.io/gitea/modules/git.DefaultLocale=C"" with C changed for the locale as necessary.
2019-11-10 08:42:51 +00:00
GiteaBot 1f3ba6919d [skip ci] Updated translations via Crowdin 2019-11-09 09:45:09 +00:00
GiteaBot c15d371939 [skip ci] Updated translations via Crowdin 2019-11-09 03:44:04 +00:00
David Svantesson 9ae4c17cb1 Allow to add and remove all repositories to/from team. (#8867)
* Allow to add and remove all repositories to team.

* Change style, buttons on same row.

* Apply suggestions from code review

Grammar

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Move set num repos to lower function.

* Make general language sentences
2019-11-09 08:39:37 +08:00
GiteaBot 884acf8295 [skip ci] Updated translations via Crowdin 2019-11-07 18:33:04 +00:00
GiteaBot f05cd3e317 [skip ci] Updated translations via Crowdin 2019-11-06 13:42:48 +00:00
David Svantesson 72aa5a20ec Add team option to grant rights for all organization repositories (#8688)
* Add field IsAllRepositories to team

* Add AllRepositories to team UI

* Manage team with access to all repositories

* Add field IsAllRepositories to team API

* put backticks around table/column names

* rename IsAllRepositories to IncludesAllRepositories

* do not reload slice if already loaded

* add repo to teams with access to all repositories when changing repo owner

* improve tests for teams with access to all repositories

* Merge branch 'master'

* Change code for adding all repositories

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* fmt after merge

* Change code in API EditTeam similar to EditTeamPost web interface

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Clarify that all repositories will be added

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* All repositories option under Permissions headline

* New setting group 'Repository access'

* Move check IncludeAllRepositories to removeRepository.

* Revert "Move check IncludeAllRepositories to removeRepository." and add comment instead.

This reverts commit 753b7d205be260b8be465b5291a02975a81f3093.

* Clarify help text what options do.
2019-11-06 11:37:14 +02:00
GiteaBot 6d42add37f [skip ci] Updated translations via Crowdin 2019-11-06 06:44:54 +00:00
GiteaBot 79fd422a92 [skip ci] Updated translations via Crowdin 2019-11-05 12:09:43 +00:00
GiteaBot 2f4ef84cbf [skip ci] Updated translations via Crowdin 2019-11-05 06:52:00 +00:00
Lauris BH a91679c9e3 Add additional periods to activity page (#8829) 2019-11-05 00:45:48 -05:00
GiteaBot 3fb9e3afe3 [skip ci] Updated translations via Crowdin 2019-11-04 10:23:49 +00:00
GiteaBot ee5249889d [skip ci] Updated translations via Crowdin 2019-11-04 04:52:17 +00:00
GiteaBot 61a3eae923 [skip ci] Updated translations via Crowdin 2019-11-02 22:49:35 +00:00
GiteaBot 729708e878 [skip ci] Updated translations via Crowdin 2019-11-02 15:29:18 +00:00
GiteaBot dd9cb32bff [skip ci] Updated translations via Crowdin 2019-11-02 13:40:49 +00:00
David Svantesson 232340f5e3 Prevent upload (overwrite) of lfs locked file (#8769)
* Check if file is locked on upload file commit.

* Better user message if file is locked.

* Check lfs lock before creating temporary repository. fix some errors.

* move lines

* Add comment that enabled setting is checked.
2019-11-02 15:37:05 +08:00
GiteaBot 9175556da0 [skip ci] Updated translations via Crowdin 2019-11-01 18:20:30 +00:00
GiteaBot 4ee986e4c9 [skip ci] Updated translations via Crowdin 2019-10-31 18:01:29 +00:00
GiteaBot cb1048d780 [skip ci] Updated translations via Crowdin 2019-10-31 05:12:32 +00:00
GiteaBot 7432396514 [skip ci] Updated translations via Crowdin 2019-10-30 20:34:47 +00:00
zeripath bda70b848f
Update licenses (#8752)
Replaces #8182
2019-10-30 16:19:14 +00:00
GiteaBot 7d9351779f [skip ci] Updated translations via Crowdin 2019-10-30 12:45:34 +00:00
GiteaBot 56ebc0c003 [skip ci] Updated translations via Crowdin 2019-10-30 06:01:01 +00:00
Benno 7bb817e6d1 Respect LFS File Lock on UI (#8719)
* update #8687 respect file locking

* upate #8687 Add LFS locker information

* update #8719 enhance coding style and return error
2019-10-29 23:32:21 +02:00
GiteaBot 9513a6983a [skip ci] Updated translations via Crowdin 2019-10-29 14:49:58 +00:00
GiteaBot 09b281a6ac [skip ci] Updated translations via Crowdin 2019-10-28 19:31:28 +00:00
zeripath 5e6a008fba
Add basic repository lfs management (#7199)
This PR adds basic repository LFS management UI including the ability to find all possible pointers within the repository. Locks are not managed at present but would be addable through some simple additions.

* Add basic repository lfs management
* add auto-associate function
* Add functionality to find commits with this lfs file
* Add link to find commits on the lfs file view
* Adjust commit view to state the likely branch causing the commit
* Only read Oid from database
2019-10-28 18:31:55 +00:00
GiteaBot 478f7db68e [skip ci] Updated translations via Crowdin 2019-10-27 20:48:38 +00:00
GiteaBot 70fa80df11 [skip ci] Updated translations via Crowdin 2019-10-26 06:56:48 +00:00
GiteaBot d2d5910894 [skip ci] Updated translations via Crowdin 2019-10-26 00:45:54 +00:00
David Svantesson 6aa3f8bc29 Mail assignee when issue/pull request is assigned (#8546)
* Send email to assigned user

* Only send mail if enabled

* Mail also when assigned through API

* Need to refactor functions from models to issue service

* Refer to issue index rather than ID

* Disable email notifications completly at initalization if global disable

* Check of user enbled mail shall be in mail notification function only

* Initialize notifications from routers init function.

* Use the assigned comment when sending assigned mail

* Refactor so that assignees always added as separate step when new issue/pr.

* Check error from AddAssignees

* Check if user can be assiged to issue or pull request

* Missing return

* Refactor of CanBeAssigned check.

CanBeAssigned shall have same check as UI.

* Clarify function names (toggle rather than update/change), and clean up.

* Fix review comments.

* Flash error if assignees was not added when creating issue/pr

* Generate error if assignee users doesn't exist
2019-10-25 22:46:37 +08:00
GiteaBot 516fd7d3ae [skip ci] Updated translations via Crowdin 2019-10-25 07:23:33 +00:00
GiteaBot a520236cb5 [skip ci] Updated translations via Crowdin 2019-10-24 21:14:00 +00:00
GiteaBot ab791fe7bb [skip ci] Updated translations via Crowdin 2019-10-24 01:20:30 +00:00
zeripath c84174b764
Use AppSubUrl for more redirections (#8647)
Fix #8461 - fix misspelling of {{AppSubUrl}} and other misspelling in template
Fixes /explore and organisation redirection
2019-10-23 22:04:22 +01:00
GiteaBot ace0346c66 [skip ci] Updated translations via Crowdin 2019-10-23 17:58:51 +00:00
jaqra dbd9d8dd54 Add 'Alt + click' feature to exclude labels (#8199)
Add 'Alt + click' and 'Alt +enter' feature to exclude particular labels on searching for issues.
2019-10-23 17:29:14 +01:00
GiteaBot 637e3219ab [skip ci] Updated translations via Crowdin 2019-10-23 15:37:47 +00:00
GiteaBot 7d1a7c05db [skip ci] Updated translations via Crowdin 2019-10-23 14:39:37 +00:00
GiteaBot b4b0e22f5f [skip ci] Updated translations via Crowdin 2019-10-23 11:51:49 +00:00