summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* fix: show tag name on branch/tag selector if repo shown from tag ref (#32689)metiftikci2024-12-022-4/+4
|
* Refactor RepoBranchTagSelector (#32681)wxiaoguang2024-12-028-288/+275
|
* Allow to disable the password-based login (sign-in) form (#32687)wxiaoguang2024-12-027-48/+73
| | | | | | | | | | | | | | Usually enterprise/organization users would like to only allow OAuth2 login. This PR adds a new config option to disable the password-based login form. It is a simple and clear approach and won't block the future login-system refactoring works. Fix a TODO in #24821 Replace #21851 Close #7633 , close #13606
* Fix JS error when reply comment on Conversation page (#32685)wxiaoguang2024-12-022-13/+19
| | | | Fix #32684, regression of #32596 (side-effect of jQuery removal: jQuery could tolerate non-existing elements) And fix another regression bug from #30453 (initCompReactionSelector double-init)
* fix(#32667): 🐛 Fixe a keystring misuse and refactor duplicates keystrings ↵Simon Pistache2024-12-013-5/+3
| | | | | | | | | | | | | | (#32668) - Fixes a translation keystring misuse where the string 'open milestones' is used in place of 'closed milestones'. - De-duplicates the use of 'open milesones' and 'closed milestones' keystrings on the sidebar of an issue, reusing the ones on the issues filter and action bars. - Closes #32667 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Split mail sender sub package from mailer service package (#32618)Lunny Xiao2024-11-3015-405/+503
| | | | | | | | Move all mail sender related codes into a sub package of services/mailer. Just move, no code change. Then we just have dependencies on go-mail package in the new sub package. We can use other package to replace it because it's unmaintainable. ref #18664
* Fix a bug in actions artifact test (#32672)Zettat1232024-11-291-5/+5
| | | | | | | | | | | | | | This bug exists in `TestActionsArtifactDownload`. https://github.com/go-gitea/gitea/blob/a1f56f83bff56f86180e59742efd3748908b82c1/tests/integration/api_actions_artifact_test.go#L123-L134 We assert that `listResp.Count` is `2`, so `artifactIdx` could be `0` or `1`. https://github.com/go-gitea/gitea/blob/a1f56f83bff56f86180e59742efd3748908b82c1/tests/integration/api_actions_artifact_test.go#L144-L147 Then we assert that the length of `downloadResp.Value` is `1`. If `artifactIdx` is `1` at this point, the assertion on Line 147 will throw an `index out of range` error.
* Move GetFeeds to service layer (#32526)Lunny Xiao2024-11-2916-211/+250
| | | Move GetFeeds from models to service layer, no code change.
* Refactor render system (orgmode) (#32671)wxiaoguang2024-11-293-50/+85
| | | Close #29100
* Improve diff file tree (#32658)silverwind2024-11-282-2/+8
| | | | | | | | - Unfolded directories now show a "open" icon - Prevent accidential text selection while toggling directories - Increase vertical item padding from 3px to 6px <img width="257" alt="image" src="https://github.com/user-attachments/assets/d5372306-a666-4732-827e-3ddeee3c711e">
* Don't create action when syncing mirror pull refs (#32659)Lunny Xiao2024-11-281-0/+6
| | | Fix #27961
* Allow users with write permission to run actions (#32644)Pedro Nishiyama2024-11-282-3/+3
| | | | | --- I have a use case where I need a team to be able to run actions without admin access.
* Validate OAuth Redirect URIs (#32643)Rowan Bohde2024-11-287-31/+302
| | | | | | | This fixes a TODO in the code to validate the RedirectURIs when adding or editing an OAuth application in user settings. This also includes a refactor of the user settings tests to only create the DB once per top-level test to avoid reloading fixtures.
* Allow cropping an avatar before setting it (#32565)Kerwin Bryant2024-11-2812-9/+80
| | | | | | | | | | | | Provide a cropping tool on the avatar editing page, allowing users to select the cropping area themselves. This way, users can decide the displayed area of the image, rather than us deciding for them. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Add webpack EnvironmentPlugin (#32661)silverwind2024-11-281-1/+5
| | | | | | Fixes: https://github.com/go-gitea/gitea/issues/32660 Environment vars in Webpack need to be declared in the config, otherwise they will not be elimininated during compilation.
* Move team related functions to service layer (#32537)Lunny Xiao2024-11-2726-483/+452
| | | | | There are still some functions under `models` after last big refactor about `models`. This change will move all team related functions to service layer with no code change.
* Make frontend unit test code could know it is in testing (#32656)wxiaoguang2024-11-282-3/+10
| | | See the comment of isInFrontendUnitTest
* Add priority to protected branch (#32286)65432024-11-2722-13/+454
| | | | | | | | | | | | | | | | | | | ## Solves Currently for rules to re-order them you have to alter the creation date. so you basicly have to delete and recreate them in the right order. This is more than just inconvinient ... ## Solution Add a new col for prioritization ## Demo WebUI Video https://github.com/user-attachments/assets/92182a31-9705-4ac5-b6e3-9bb74108cbd1 --- *Sponsored by Kithara Software GmbH*
* Regenerate fomantic package-lock.json (#32650)silverwind2024-11-271-329/+1083
| | | | | | Fixes: https://github.com/go-gitea/gitea/security/dependabot/83 Fixes: https://github.com/go-gitea/gitea/security/dependabot/84 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix global form submit event (#32652)wxiaoguang2024-11-271-1/+1
|
* Introduce OrgList and add LoadTeams, optimaze Load teams for orgs (#32543)Lunny Xiao2024-11-264-5/+47
|
* Refactor markup render system (#32645)wxiaoguang2024-11-267-216/+179
| | | | | | | This PR mainly removes some global variables, moves some code and renames some functions to make code clearer. This PR also removes a testing-only option ForceHardLineBreak during refactoring since the behavior is clear now.
* Fix: passkey login not working anymore (#32623)hiifong2024-11-269-47/+86
| | | | | | | Quick fix #32595, use authenticator auth flags to login --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor some frontend problems (#32646)wxiaoguang2024-11-2622-183/+192
| | | | | | | | | | | 1. correct the modal usage on "admin email list" page (then `web_src/js/features/admin/emails.ts` is removed) 2. use `addDelegatedEventListener` instead of `jQuery().on` 3. more jQuery related changes and remove jQuery from `web_src/js/features/common-button.ts` 4. improve `confirmModal` to make it support header, and remove incorrect double-escaping 5. fix more typescript related types 6. fine tune devtest pages and add more tests
* Bypass vitest bug (#32647)wxiaoguang2024-11-262-1/+12
|
* Fix race condition in mermaid observer (#32599)william-allspice2024-11-261-8/+11
| | | | | | | | | | | | | This Pull Request addresses a race condition in the updateIframeHeight function where it is sometimes called when the iframe is not fully loaded or accessible resulting in an alarming error message for the user. To address this we: 1. Add defensive programming within the updateIframeHeight function 2. Delay instantiating the intersection observer until the iframe has loaded Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve oauth2 scope token handling (#32633)wxiaoguang2024-11-264-12/+21
|
* Fixed Issue of Review Menu Shown Behind (#32631)Kerwin Bryant2024-11-266-26/+38
| | | | | | | Fixed #31144 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add github compatible tarball download API endpoints (#32572)Lunny Xiao2024-11-257-31/+152
| | | | Fix #29654 Fix #32481
* Fix markup render regression and fix some tests (#32640)wxiaoguang2024-11-266-23/+37
| | | | | | | Fix #32639, https://github.com/go-gitea/gitea/issues/32608#issuecomment-2497918210 By the way, fix some incorrect SQLs (use single quote but not double quote)
* Fix sqlite3 test (#32622)wxiaoguang2024-11-251-0/+12
|
* Strict pagination check (#32548)Lunny Xiao2024-11-259-11/+11
|
* Refactor markup render system (#32612)wxiaoguang2024-11-2465-1193/+1095
| | | | | | | | | | This PR removes (almost) all path tricks, and introduces "renderhelper" package. Now we can clearly see the rendering behaviors for comment/file/wiki, more details are in "renderhelper" tests. Fix #31411 , fix #18592, fix #25632 and maybe more problems. (ps: fix #32608 by the way)
* Add vue-tsc (#32601)silverwind2024-11-233-4/+147
| | | | | | As per https://vuejs.org/guide/typescript/overview#overview, typescript's `tsc` does not support importing `.vue` files from `.ts` files, so we need to use `vue-tsc` which patches in that support. Added a convenience alias `make tsc` to run it.
* Support optional/configurable IAMEndpoint for Minio Client (#32581) (#32581)Michael Owoc2024-11-225-11/+46
| | | | | | | | | | | | | | | | | | | | | | | Targeting issue #32271 This modification allows native Kubernetes + AWS (EKS) authentication with the Minio client, to Amazon S3 using the IRSA role assigned to a Service account by replacing the hard coded reference to the `DefaultIAMRoleEndpoint` with an optional configurable endpoint. Internally, Minio's `credentials.IAM` provider implements a discovery flow for IAM Endpoints if it is not set. For backwards compatibility: - We have added a configuration mechanism for an `IamEndpoint` to retain the unit test safety in `minio_test.go`. - We believe existing clients will continue to function the same without needing to provide a new config property since the internals of Minio client also often resolve to the `http://169.254.169.254` default endpoint that was being hard coded before To test, we were able to build a docker image from source and, observe it choosing the expected IAM endpoint, and see files uploaded via the client.
* Update the list of watchers and stargazers when clicking watch/unwatch or ↵Yarden Shoham2024-11-223-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | star/unstar (#32570) We make sure the user cards are updated - Fixes https://github.com/go-gitea/gitea/issues/32561 I also removed `ctx.Data["PageIsWatchers"] = true` and `ctx.Data["PageIsStargazers"] = true` as they are not used anywhere. # Before ![before](https://github.com/user-attachments/assets/e3bc3235-35eb-4eda-862d-bdf2510282ea) # After ![after](https://github.com/user-attachments/assets/bc0488a5-8399-4cf6-95c9-17328a9702eb) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Apply to became a maintainer (#32614)hiifong2024-11-221-0/+1
| | | | [PRs list](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3Ahiifong+is%3Aclosed+is%3Amerged)
* Fix get reviewers' bug (#32415)Lunny Xiao2024-11-2212-158/+225
| | | | | | | | | | This PR rewrites `GetReviewer` function and move it to service layer. Reviewers should not be watchers, so that this PR removed all watchers from reviewers. When the repository is under an organization, the pull request unit read permission will be checked to resolve the bug of #32394 Fix #32394
* Fix issues with inconsistent spacing in areas (#32607)Kerwin Bryant2024-11-222-3/+3
| | | | | | | | | | | | | | | | | | | Fix issues with inconsistent spacing in areas where the branch_dropdown component is used. before: ![1732238359257](https://github.com/user-attachments/assets/38edda1f-ec4e-419e-9264-68009375d177) ![1732238334410](https://github.com/user-attachments/assets/c4770aea-bc83-477c-9b6a-632f984c0d7d) after: ![1732238273317](https://github.com/user-attachments/assets/4d05068e-db97-45af-86c4-29442dff1bdf) ![1732238723881](https://github.com/user-attachments/assets/69acd286-f79b-44fe-ad73-2d5fc6dfc98c) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor markup render system (#32589)wxiaoguang2024-11-2249-626/+486
| | | | This PR mainly moves some code and introduces `RenderContext.WithXxx` functions
* Style unification for the issue_management area (#32605)Kerwin Bryant2024-11-222-3/+3
| | | | | | | | | | | | | | | | | | | | Style unification for the issue_management area (consistent across the layout before: ![1732237277916](https://github.com/user-attachments/assets/52a20b2d-d6a4-4118-9cdf-9b377115b7f7) ![1732237288802](https://github.com/user-attachments/assets/05592fe8-cab2-412b-99bc-f0a201c08413) ![1732237299849](https://github.com/user-attachments/assets/8be4a891-c514-4983-bad4-fcc5a7a9d838) after: ![1732237471086](https://github.com/user-attachments/assets/0bd19ef6-79c1-490a-8ffa-6a42208befd9) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Enhancing Gitea OAuth2 Provider with Granular Scopes for Resource Access ↵Marcell Mars2024-11-228-18/+537
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#32573) Resolve #31609 This PR was initiated following my personal research to find the lightest possible Single Sign-On solution for self-hosted setups. The existing solutions often seemed too enterprise-oriented, involving many moving parts and services, demanding significant resources while promising planetary-scale capabilities. Others were adequate in supporting basic OAuth2 flows but lacked proper user management features, such as a change password UI. Gitea hits the sweet spot for me, provided it supports more granular access permissions for resources under users who accept the OAuth2 application. This PR aims to introduce granularity in handling user resources as nonintrusively and simply as possible. It allows third parties to inform users about their intent to not ask for the full access and instead request a specific, reduced scope. If the provided scopes are **only** the typical ones for OIDC/OAuth2—`openid`, `profile`, `email`, and `groups`—everything remains unchanged (currently full access to user's resources). Additionally, this PR supports processing scopes already introduced with [personal tokens](https://docs.gitea.com/development/oauth2-provider#scopes) (e.g. `read:user`, `write:issue`, `read:group`, `write:repository`...) Personal tokens define scopes around specific resources: user info, repositories, issues, packages, organizations, notifications, miscellaneous, admin, and activitypub, with access delineated by read and/or write permissions. The initial case I wanted to address was to have Gitea act as an OAuth2 Identity Provider. To achieve that, with this PR, I would only add `openid public-only` to provide access token to the third party to authenticate the Gitea's user but no further access to the API and users resources. Another example: if a third party wanted to interact solely with Issues, it would need to add `read:user` (for authorization) and `read:issue`/`write:issue` to manage Issues. My approach is based on my understanding of how scopes can be utilized, supported by examples like [Sample Use Cases: Scopes and Claims](https://auth0.com/docs/get-started/apis/scopes/sample-use-cases-scopes-and-claims) on auth0.com. I renamed `CheckOAuthAccessToken` to `GetOAuthAccessTokenScopeAndUserID` so now it returns AccessTokenScope and user's ID. In the case of additional scopes in `userIDFromToken` the default `all` would be reduced to whatever was asked via those scopes. The main difference is the opportunity to reduce the permissions from `all`, as is currently the case, to what is provided by the additional scopes described above. Screenshots: ![Screenshot_20241121_121405](https://github.com/user-attachments/assets/29deaed7-4333-4b02-8898-b822e6f2463e) ![Screenshot_20241121_120211](https://github.com/user-attachments/assets/7a4a4ef7-409c-4116-9d5f-2fe00eb37167) ![Screenshot_20241121_120119](https://github.com/user-attachments/assets/aa52c1a2-212d-4e64-bcdf-7122cee49eb6) ![Screenshot_20241121_120018](https://github.com/user-attachments/assets/9eac318c-e381-4ea9-9e2c-3a3f60319e47) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add line-through for deleted branch on pull request view page (#32500)Lunny Xiao2024-11-214-4/+11
| | | | | | | | | | | | | Base branch deleted ![图片](https://github.com/user-attachments/assets/bc45aa33-d514-47c8-885a-de9732f2f3d5) branch deleted comment ![图片](https://github.com/user-attachments/assets/83729bbb-2ee8-4bd3-b6f1-780d2daad3d4) Head branch deleted ![图片](https://github.com/user-attachments/assets/90120b22-34a9-4387-aae9-5c882e8d421a)
* Fix issue sidebar regression (#32598)wxiaoguang2024-11-221-1/+1
|
* Fix PR diff review form submit (#32596)wxiaoguang2024-11-214-70/+79
| | | | Fix #31622, there is a longstanding bug in #19612, it doesn't handle submit event, correctly.
* Fix some typescript issues (#32586)silverwind2024-11-2124-73/+89
| | | Fixes around 30 or so typescript errors. No runtime changes.
* Fix GetInactiveUsers (#32540)Lunny Xiao2024-11-213-6/+27
| | | Fix #31480
* disable gravatar in test (#32529)Rowan Bohde2024-11-215-92/+89
| | | | | When running e2e tests on flaky networks, gravatar can cause a timeout and test failures. Turn off, and populate avatars on e2e test suite run to make them reliable.
* Add 'Copy path' button to file view (#32584)silverwind2024-11-213-1/+3
| | | | Also adds a tooltip which is replicated to the same button in the diff box. Fixes: https://github.com/go-gitea/gitea/issues/32583
* Improve issue sidebar UI (#32587)wxiaoguang2024-11-216-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. remove duplicate dividers 2. align reviewer items 3. merge & remove unused CSS styles Before: <details> ![image](https://github.com/user-attachments/assets/1b3121ee-b5fa-4fe9-b0f2-344d96dc5fbc) ![image](https://github.com/user-attachments/assets/ba8b97e6-114d-488c-adee-48f6c7a3b580) </details> After: <details> ![image](https://github.com/user-attachments/assets/978eab3e-a5d7-4b68-90ce-079b61994d25) ![image](https://github.com/user-attachments/assets/a8b58a27-dd05-4c8d-be60-816439ce77c6) ![image](https://github.com/user-attachments/assets/b7e6a16c-bf98-4465-a805-9f4a642d366e) </details>