7089 Commits (01c10a951b9db0b9f020ef657ca71eb5e5882a84)
 

Author SHA1 Message Date
zeripath 01c10a951b
Fix ssh deploy and user key constraints (#1357) (#5939)
1. A key can either be an ssh user key or a deploy key. It cannot be both.
2. If a key is a user key - it can only be associated with one user.
3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different.
4. If a repository is deleted, its deploy keys must be deleted too.

We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints:

- [x] You should not be able to add the same user key as another user
- [x] You should not be able to add a ssh user key which is being used as a deploy key
- [x] You should not be able to add a ssh deploy key which is being used as a user key
- [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode.
- [x] If you delete a repository you must delete all its deploy keys.

Fix #1357
5 years ago
Lanre Adelowo 634cbaad2b show user who created the repository instead of the organization in action feed (#5948) 5 years ago
Lanre Adelowo 746cf22d8a handle milestone events for issues and PR (#5947) 5 years ago
zeripath 13c0f7dfff
Fix notifications on pushing with deploy keys by setting hook environment variables (#5935)
The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed.

I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key.

There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR.

Fix #3795 

Signed-off-by: Andrew Thornton art27@cantab.net
5 years ago
zeripath 2902b3a68c
Fix #5866: Silence console logger in gitea serv (#5887)
By default, if `setting.NewContext()` prints out any warning logs, these are printed to the stdout breaking `git receive-pack` etc. meaning that even if there is a warning because of a minor problem in your app.ini but gitea starts despite this - you **CANNOT** push or pull over SSH.

This PR disables the console logger whilst in `serv.go`

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
John Olheiser f81c6cc2a9 Remove all CommitStatus when a repo is deleted (#5940)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Lunny Xiao ecefa9e724 Add single commit API support (#5843)
* add single commit API support
5 years ago
zeripath 3d91bb2f2d Make log mailer for testing (#5893)
* Create log mailer for testing email settings

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

* Switch on the log mailer for the integration tests

This ensures that the sending mail process works

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

* rename the from user for mysql/mssql

* rename log sender to dummy sender

* update the integration tests
5 years ago
Sergey Romanov 67567eff0e fix log output (#5938) 5 years ago
silverwind 12ee544411 Fix wrapping long code lines in UI (#5927)
Wrapping was initially added in https://github.com/go-gitea/gitea/pull/2789
but it is currently disabled because the rule that applies wrapping to
the wrap class did not have enough CSS specificity.

Resolved the issue by using a general selector that matches all code
boxes. The previous wrap class was removed because it had only been
inconsistenly applied to various code boxes and because I found no easy
way to add classes to code boxes rendered in Markdown.

Also removed a seemingly useless :before on code view and added padding
to restore the spacing.
5 years ago
silverwind af22df8314 UI: Better support for long repo names (#5932)
* UI: Make long repo names wrap less often

* also adjust news feed column widths
5 years ago
Lanre Adelowo f9d4bd53e6 support reviewing on a deleted file path (#5880) 5 years ago
techknowlogick 1219d46b02
1.7.1 changelog (#5919) 5 years ago
techknowlogick 3a7306945c
Disable redirect for i18n (#5910) 5 years ago
GiteaBot 98feb0ef4d [skip ci] Updated translations via Crowdin 5 years ago
Lunny Xiao bbad9b6178 Fix bug when read public repo lfs file (#5912)
* fix bug when read public repo lfs file

* add comment on lfs permission check
5 years ago
zeripath 0823791d17 Recover panic in orgmode.Render if bad orgfile (#4982) (#5903)
This PR protects against the panic referred to in chaseadmsio/goorgeous#82
by recovering from the panic and just returning the raw bytes if
there is an error.

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
zeripath ca00ca8ee4 Provide better panic handling (#5902)
This PR gitea'ises the macaron.Recovery() handler meaning that in
the event of panic we get proper gitea 500 pages and the stacktrace
is logged with the gitea logger.

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
zeripath 0f295ababa Only allow local login if password is non-empty (#5906) 5 years ago
Lauris BH 80098bd752 Fix go-get URL generation (#5905) 5 years ago
Lanre Adelowo 57a69ef277 don't allow pull requests to be created on an archived repository (#5883)
* don't allow pull requests to be created on an archived repository
Also disable the "PR" button if the repo is archived

* Refuse creating an issue/PR via API calls too
5 years ago
Lanre Adelowo 6dc2f401c9 Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)
* Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when
creating a user
5 years ago
Lanre Adelowo 7933a950d0 respect value of REQUIRE_SIGNIN_VIEW (#5901) 5 years ago
Lauris BH fada6968a8 Fix new release creation API to allow empty target (#5870)
* Fix new release creation API to allow empty target

* Add more test cases

* Update swagger
5 years ago
Lanre Adelowo 8b5f6ced22 if repo does not exist, show a 404 not a 500 (#5900) 5 years ago
EpicCoder a967cf9e99 UI: Correct footer height if screen-width is to small (fixes #5878) (#5889) (#5889) 5 years ago
Lanre Adelowo 16678f5255 fix compare button on upstream repo leading to 404 (#5877) 5 years ago
EpicCoder c62c0b669a UI: Change GPG Validation colors and remove inline CSS; fixes #5404 (#5896) 5 years ago
zeripath 2569363204
Also ensure the repo is loaded (#5895)
Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
GiteaBot 002e898bcf [skip ci] Updated translations via Crowdin 5 years ago
zeripath 036964b4a7 Ensure issue.Poster is loaded in mailIssueCommentToParticipants (#5891)
Previous code could potentially dereference nil - this PR ensures
that the poster is loaded before dereferencing it.

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
zeripath 8917d66571 Add migration test (#5773)
* Add migration test

This commit adds a simple migration test for v1.5.3, v1.6.4 and v1.7.0-rc3

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

* Automigrate based on available dbs

* remove old ini file

* Standardise the dialect names
6 years ago
GiteaBot bc748f205a [skip ci] Updated translations via Crowdin 6 years ago
vee w 573650877c Fix wrong URL to download link. (#5881)
* Fix wrong URL to download link.

The link does not contain trailing slash and cause error page displayed.

* Update version
6 years ago
kekero 3568d426fe New Issue ?body= query (#5851)
* New Issue ?body= query

* Override issue template with body query

* Add documentation for issue body query
6 years ago
Lanre Adelowo 7461c5a75f Fix "pulls.blocked_by_approvals" text (#5879) 6 years ago
GiteaBot 56415fa2fc [skip ci] Updated translations via Crowdin 6 years ago
zeripath bf47f70c3b
API: Fix null pointer in attempt to Sudo if not logged in (#5872)
Signed-off-by: Andrew Thornton <art27@cantab.net>
6 years ago
Gabriel Silva Simões 5f4a40c4a3 Revert #3711 overwrite of only show "No Description" to repo admins #2167 (#5836)
Revert #3711 overwrite of only show "No Description" to repo admins  #2167 and add tests to prevent accidental overwrite again.
6 years ago
zeripath 182a6d6885 Fix wording of #5858 issue.review.reject string (#5869)
As per @lafriks comment this should be: requested changes

Signed-off-by: Andrew Thornton <art27@cantab.net>
6 years ago
GiteaBot 34a1c4c514 [skip ci] Updated translations via Crowdin 6 years ago
Harshit Bansal 7e8242ddb1 Fix an error while adding a dependency via UI. (#5862)
Fixes: #5783
6 years ago
GiteaBot 2d8520d039 [skip ci] Updated translations via Crowdin 6 years ago
sebastian-sauer 84076211b3 Config option to disable automatic repo watching (#5852)
Add a new config option to enable / disable the automatic watching of
repos for new repositories and if a user is added to a team.

Fixes #653

Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
6 years ago
Lanre Adelowo b8a81cb1b8 Rename reject to 'request changes' (#5858)
* remame reject to 'request changes

* make usee of requested changes in issue's view content
6 years ago
Jakub Arbet a757920f4e Fix failing migration v67 (#5849)
Fixes #5848
6 years ago
yasuokav 8510ac2687 Fix MinInterval (#5856)
Fixes #5847
6 years ago
GiteaBot ac766fe3de [skip ci] Updated translations via Crowdin 6 years ago
sebastian-sauer 8656a3c62d Move input fields to add members to a team and repos to a team (#5853)
Move input fields to the top so no scrolling is needed to add
new members / repos to a team.

Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
6 years ago
yasuokav d663930023 fix delete correct temp directory (#5839) 6 years ago