Commit Graph

1990 Commits (83560bf9d0e141b1498e724d0e68d462625e4624)

Author SHA1 Message Date
ngourdon 7284829962 Fix team edit API panic (#6785)
* fix team edit API panic

* Change user to a member of the owner team
6 years ago
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
6 years ago
techknowlogick e6cd4f3276
OAuth2 token can be used in basic auth (#6747) (#6761) 6 years ago
Lunny Xiao 30226b4793 fix missing return (#6751) (#6756) 6 years ago
Lunny Xiao aecd9231ba Fix: Sort repos on org home page with non-admin login (#6741) (#6746) 6 years ago
Lunny Xiao 5f6b118007
Fix team members API (#6714) (#6729) 6 years ago
John Olheiser b1cb52e477 [API] Load issue attributes when editing an issue (#6723) (#6725) 6 years ago
techknowlogick ba12463175 backport #6674 - API OTP Context (#6676) 6 years ago
zeripath 66a3353c31 Properly escape on the redirect from the web editor (#6657) (#6667) 6 years ago
zeripath b9c5a3acc3 Return a UserList from /api/v1/admin/users (#6629) (#6642) 6 years ago
zeripath 40f41dc694
Correctly adjust mirror url (#6593) (#6594) 6 years ago
John Olheiser a63b9fbc70 Change summary to full message (#6591) (#6592)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
6 years ago
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>
6 years ago
Lunny Xiao 5be1b7df3f fix bug user search API pagesize didn't obey ExplorePagingNum (#6579) (#6586) 6 years ago
Lauris BH 3b28de7d8e fix bug when user login and want to resend register confirmation email (#6482) (#6486) 6 years ago
Segev Finer e54f7a708c Fix Hook & HookList in Swagger (#6432) (#6440)
Backport from #6432
6 years ago
mrsdizzie 63f6764dce Clean up ref name rules (#6437) (#6439) 6 years ago
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
6 years ago
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
6 years ago
Lanre Adelowo 16815306ad make sure units of a team are returned (#6379) (#6381) 6 years ago
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
6 years ago
John Olheiser c55bdca562 Add same changes from issues page to milestone->issues page (#6328) 6 years ago
Bogdan Petrea 583968f274 Return 409 when creating repo if it already exists. (#6330) 6 years ago
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
6 years ago
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
6 years ago
Aidan Fitzgerald f5cf9a8355 Copyedit docs (#6275) 6 years ago
Jonas Franz 8fffb06168
Add regenerate secret feature for oauth2 (#6291)
* Add regenerate secret functionality

* Fix lint
6 years ago
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>
6 years ago
Jonas Franz e777c6bdc6 Integrate OAuth2 Provider (#5378) 6 years ago
Lanre Adelowo 141c58f5a6 add isAdmin to user model (#6231)
update vendor and add tests

fix swagger
6 years ago
Lunny Xiao c812ba7f87
fix display dashboard even if require to change password (#6214)
* fix display dashboard even if require to change password

* fix comments
6 years ago
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>
6 years ago
John Olheiser 7548037a64 Adds MustChangePassword to user create/edit API, defaults to true (#6193)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
6 years ago
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
6 years ago
Lunny Xiao 4a2fbbeb10 fix bug user could change private repository to public when force private enabled. (#6156) 6 years ago
Lunny Xiao 134e55510e fix bug when update owner team then visit team's repo return 404 (#6119) 6 years ago
John Olheiser df30010dbd Make repo creation for API similar to UI (#6142) 6 years ago
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
6 years ago
John Olheiser 994b1be9d1 Admins can now do unlimited page size user search (listAllUsers & listAllOrgs) (#6143)
Non-admins will default to 10 page size
6 years ago
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
6 years ago
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.
6 years ago
John Olheiser ba0749b7db Load Issue attributes for API call (#6122)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
6 years ago
Lunny Xiao 830ae61456 Refactor issue indexer (#5363) 6 years ago
Lanre Adelowo 094263db4d Show email if the authenticated user owns the profile page being requested for (#4981)
* Show email if the authenticated user owns the profile page being
requested for.

Also removed `setting.UI.ShowUserEmail` as it's documentation says it
only controls the email setting on the explore page

* fix current user check... This prevents a panic as a user must be signed in before ctx.User is called

* fix panic in tests

* try to fix tests

* Update year

* Test CI fail

* Revert change

* User 3 is not allowed to authorize

* Set user2 email to be private

* Change to user4 in explore page as user2 now has private email option set
6 years ago
Lunny Xiao f5fa22a499 Fix prohibit login check on authorization (#6106)
* fix bug prohibit login not applied on dashboard

* fix tests

* fix bug user status leak

* fix typo

* return after render
6 years ago
Zsombor 538a26d56f Show private organization for admin, fix #6111 (#6112) 6 years ago
Lanre Adelowo 44114b38e6 Implement "conversation lock" for issue comments (#5073) 6 years ago
Rémy Boulanouar 64ce159a6e Allow to set organization visibility (public, internal, private) (#1763) 6 years ago
John Olheiser 0b72c00fad Allow labels to contain emoji (#6063)
* Add emoji to labels
Minor cleanup of tribute code in footer.tmpl

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

* Quick find/replace in other i18n files containing label translations

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

* Revert "Quick find/replace in other i18n files containing label translations"

This reverts commit ec3e1a3a17.

* Add style to overwrite emoji height in labels

* Revert Makefile change that makes Windows work
6 years ago
Lanre Adelowo f2256d9881 make sure labels are actually returned (#6053) 6 years ago