Commit graph

1999 commits

Author SHA1 Message Date
Lanre Adelowo
5e97b2d00e archived repos can be starred and watched (#7163) (#7168) 2019-06-10 09:20:34 -04:00
Lunny Xiao
31ad8b7026 Fix wrong init dependency on markup extensions (#7038) (#7074)
* fix wrong init dependency on markup extensions
2019-05-29 12:05:36 -04:00
zeripath
8d5c3d3d0b
Install page - Handle invalid administrator username better (#7060) (#7063)
* Install page - detect invalid admin username before installing

* Also fix #6954
2019-05-28 10:38:13 +01:00
Lauris BH
608f46e59c
SearchRepositoryByName improvements and unification (#6897) (#7002)
* SearchRepositoryByName improvements and unification (#6897)

* Update tests

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

* Update tests

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

* Update tests

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

* Fix tests
2019-05-21 18:07:07 +03:00
techknowlogick
e069a75817 Use AppURL for Oauth user link (#6894) (#6925) 2019-05-13 07:53:02 +03:00
Richard Mahn
c8fc7fce4a Fixes #6881 - API users search fix (#6882) (#6885) 2019-05-09 13:37:49 +08:00
Lunny Xiao
5f20841bc3 Fix 404 when send pull request some situation (#6871) (#6873) 2019-05-08 00:05:05 -04:00
Lunny Xiao
476ca67cd4 fix config ui error about cache ttl (#6861) (#6865) 2019-05-06 19:18:17 +03:00
Lunny Xiao
96eb99ea55 fix 500 when reviewer is deleted with integration tests (#6856) (#6860) 2019-05-06 17:03:35 +03:00
ngourdon
7284829962 Fix team edit API panic (#6785)
* fix team edit API panic

* Change user to a member of the owner team
2019-04-28 09:52:38 -04:00
Lunny Xiao
81adf6ad86 Fix org visibility bug when git cloning (#6743) (#6762)
* fix org visibility bug

* fix permission check

* add integration tests

* fix tests

* change test user name for easier maintainance and fix test

* fix test git repo name
2019-04-26 15:02:27 +03:00
techknowlogick
e6cd4f3276
OAuth2 token can be used in basic auth (#6747) (#6761) 2019-04-25 19:57:35 -04:00
Lunny Xiao
30226b4793 fix missing return (#6751) (#6756) 2019-04-25 10:38:51 -04:00
Lunny Xiao
aecd9231ba Fix: Sort repos on org home page with non-admin login (#6741) (#6746) 2019-04-24 22:47:44 -04:00
Lunny Xiao
5f6b118007
Fix team members API (#6714) (#6729) 2019-04-24 20:41:02 +08:00
John Olheiser
b1cb52e477 [API] Load issue attributes when editing an issue (#6723) (#6725) 2019-04-23 20:48:20 +03:00
techknowlogick
ba12463175 backport #6674 - API OTP Context (#6676) 2019-04-19 20:18:10 +08:00
zeripath
66a3353c31 Properly escape on the redirect from the web editor (#6657) (#6667) 2019-04-17 15:52:45 -04:00
zeripath
b9c5a3acc3 Return a UserList from /api/v1/admin/users (#6629) (#6642) 2019-04-15 17:38:41 -04:00
zeripath
40f41dc694
Correctly adjust mirror url (#6593) (#6594) 2019-04-12 22:25:06 +01:00
John Olheiser
a63b9fbc70 Change summary to full message (#6591) (#6592)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-04-12 20:47:29 +03:00
Jonas Franz
72f4cdf868 Add option to disable refresh token invalidation (#6584) (#6587)
* Add option to disable refresh token invalidation

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add integration tests and remove wrong todos

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix typo

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix tests and add documentation

Signed-off-by: Jonas Franz <info@jonasfranz.software>

(cherry picked from commit 783cd64927)
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2019-04-12 13:42:44 +03:00
Lunny Xiao
5be1b7df3f fix bug user search API pagesize didn't obey ExplorePagingNum (#6579) (#6586) 2019-04-11 21:45:35 -04:00
Lauris BH
3b28de7d8e fix bug when user login and want to resend register confirmation email (#6482) (#6486) 2019-04-02 09:36:56 +01:00
Segev Finer
e54f7a708c Fix Hook & HookList in Swagger (#6432) (#6440)
Backport from #6432
2019-03-27 09:03:34 +02:00
mrsdizzie
63f6764dce Clean up ref name rules (#6437) (#6439) 2019-03-26 21:14:22 +00:00
Allen Wild
0bf7ed55be routers/repo/setting: display correct error for invalid mirror interval (#6429)
Set Err_Interval in the context data so that the mirror interval box is
highlighted red as expected.

Clear Err_RepoName for the mirror and advanced actions. repo_name is not
set by these forms, causing auth.validate() to set the Err_RepoName
before SettingsPost is called, which would lead to the repository name
box getting erroneously highlighted red.

Fixes: https://github.com/go-gitea/gitea/issues/6396
2019-03-25 20:35:06 -04:00
mrsdizzie
3ce195115b Don't Unescape redirect_to cookie value (#6399) (#6401)
redirect_to holds a value that we want to redirect back to after login.
This value can be a path with intentonally escaped values and we
should not unescape it.

Fixes #4475
2019-03-21 08:58:49 +02:00
Lanre Adelowo
16815306ad make sure units of a team are returned (#6379) (#6381) 2019-03-19 18:40:54 -04:00
mrsdizzie
ca46385637 Clean up various use of escape/unescape functions for URL generation (#6334)
* Use PathUnescape instead of QueryUnescape when working with branch names

Currently branch names with a '+' fail in certain situations because
QueryUnescape replaces the + character with a blank space.

Using PathUnescape should be better since it is defined as:

// PathUnescape is identical to QueryUnescape except that it does not
// unescape '+' to ' ' (space).

Fixes #6333

* Change error to match new function name

* Add new util function PathEscapeSegments

This function simply runs PathEscape on each segment of a path without
touching the forward slash itself. We want to use this instead of
PathEscape/QueryEscape in most cases because a forward slash is a valid name for a
branch etc... and we don't want that escaped in a URL.

Putting this in new file url.go and also moving a couple similar
functions into that file as well.

* Use EscapePathSegments where appropriate

Replace various uses of EscapePath/EscapeQuery with new
EscapePathSegments. Also remove uncessary uses of various
escape/unescape functions when the text had already been escaped or was
not escaped.

* Reformat comment to make drone build happy

* Remove no longer used url library

* Requested code changes
2019-03-18 10:00:23 -04:00
John Olheiser
c55bdca562 Add same changes from issues page to milestone->issues page (#6328) 2019-03-15 11:50:27 -04:00
Bogdan Petrea
583968f274 Return 409 when creating repo if it already exists. (#6330) 2019-03-15 10:19:09 -04:00
Lunny Xiao
4334fe754e
update git vendor to fix wrong release commit id and add migrations (#6224)
* update git vendor to fix wrong release commit id and add migrations

* fix count

* fix migration release

* fix tests
2019-03-11 11:44:58 +08:00
Jonas Franz
2315019fef Add support for client basic auth for exchanging access tokens (#6293)
* Add support for client basic auth for exchanging access tokens

* Improve error messages

* Fix tests
2019-03-11 10:54:59 +08:00
Aidan Fitzgerald
f5cf9a8355 Copyedit docs (#6275) 2019-03-09 16:15:45 -05:00
Jonas Franz
8fffb06168
Add regenerate secret feature for oauth2 (#6291)
* Add regenerate secret functionality

* Fix lint
2019-03-09 17:29:58 +01:00
John Olheiser
8211e01d9e Add unit types to repo action URL to correctly show 404 when archived (#6247)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-03-09 11:00:38 +00:00
Jonas Franz
e777c6bdc6 Integrate OAuth2 Provider (#5378) 2019-03-08 11:42:50 -05:00
Lanre Adelowo
141c58f5a6 add isAdmin to user model (#6231)
update vendor and add tests

fix swagger
2019-03-03 17:57:24 -05:00
Lunny Xiao
c812ba7f87
fix display dashboard even if require to change password (#6214)
* fix display dashboard even if require to change password

* fix comments
2019-02-28 16:01:42 +08:00
James E. Blair
48c101affe Create a repo redirect when transferring ownership (#6210) (#6211)
When transferring ownership of a repo to a different user/org,
create a repo redirect that points to the new location in the same
way that is done when a repo is renamed.

Signed-off-by: James E. Blair <jeblair@redhat.com>
2019-02-28 11:51:46 +08:00
John Olheiser
7548037a64 Adds MustChangePassword to user create/edit API, defaults to true (#6193)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-02-27 21:37:57 +02:00
Lunny Xiao
7afe81f28e fix bug when migrate repository 500 when repo is existed (#6188)
* fix bug when migrate repository 500 when repo is existed

* use 409 but not 422 for error status code when not exist

* translation fix
2019-02-26 09:28:56 -05:00
Lunny Xiao
4a2fbbeb10 fix bug user could change private repository to public when force private enabled. (#6156) 2019-02-22 21:56:05 +00:00
Lunny Xiao
134e55510e fix bug when update owner team then visit team's repo return 404 (#6119) 2019-02-22 11:14:45 -05:00
John Olheiser
df30010dbd Make repo creation for API similar to UI (#6142) 2019-02-21 17:07:58 -05:00
zeripath
3b61ff1895 Allow display of LFS stored Readme.md on directory page (#6073) (#6099)
* Fix display of >1Kb LFS text files

* Make LFS stored Readme files viewable

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

* Slight restructure

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

* Slight restructure

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

* catch errors and restructure LFS sections
2019-02-21 15:57:16 -05:00
John Olheiser
994b1be9d1 Admins can now do unlimited page size user search (listAllUsers & listAllOrgs) (#6143)
Non-admins will default to 10 page size
2019-02-21 15:42:54 -05:00
Lunny Xiao
0751153613
refactor issue indexer, add some testing and fix a bug (#6131)
* refactor issue indexer, add some testing and fix a bug

* fix error copyright year on comment header

* issues indexer package import keep consistent
2019-02-21 08:54:05 +08:00
John Olheiser
d26d249748 Minor UI tweaks (#5980)
* Remove all CommitStatus when a repo is deleted

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

* Minor UI tweaks (#5782)
Added 'No License' option
Added link and octicon change for external issue trackers
Reset password now notifies right away if the code is invalid

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

* More UI tweaks
More info in PR

* Generate stylesheet for arc-green

* Make gofmt work

* Change PR integration since the button is changed

* Rebase

* Generate stylesheet

* UI updates
Made the PR button a "basic" button
Vertically centered the issue checkboxes
Labels will update only once after modal is closed

* Commit to reference related issues
Resolves #5782
Resolves #5861
Addresses original question in #5993

* Change the comment wording since PR button is no longer little and green.

* Revert changes that made Windows work

* Regenerate stylesheet

* Regenerate stylesheets

* make generate-stylesheets

* Update integration again, changed button style

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

* Added ID to PR button
Changed integration to use the ID to avoid breaking in the future

* Added missing semi-colons

* Added back distinction between issue actions and filters (overlooked it before)
Moved action button over next to other action dropdowns

* Remove extra tab formatting in list.tmpl

* Remove more formatting from GoLand

* Replace hardcoded "No License" with i18n license helper.
2019-02-19 18:09:47 -05:00