Commit graph

1331 commits

Author SHA1 Message Date
02e72205ad Drag and Drop UI: fix lint
Some checks failed
Integration tests for the release process / release-simulation (push) Has been cancelled
2025-04-05 19:27:33 +02:00
David Rotermund
8073343f1d Merge branch 'forgejo' into upload_with_path_structure 2025-04-05 16:38:05 +00:00
Mathieu Fenniak
6ad706aa88 feat(ui): Automatically refresh workflows in the "Actions" list (#7361)
- Make the "Actions" list (for example, https://codeberg.org/forgejo/forgejo/actions) dynamically refresh using htmx and partial page reloading. This addresses a pet peeve of mine, I find it common to end up on this page and have workflows in-progress, but not be able to monitor the workflows to success or failure from the page as it currently doesn't do any data refreshing.
- There are a few major risks involves with this change.
  - Increased server-side load & network utilization.  In order to mitigate this risk, I have configured the refresh to occur every 30 seconds **only** when the Page Visibility API indicates that the web page is currently visible to the end-user. It is still reasonable to assume this change will increase server-side load though.
  - UI interactions on the page, such as the "Actor" and "Status" dropdown and the workflow dispatch form, would be replaced from the server with non-expanded UI during the refresh. This problem is prevented by stopping the refresh while these UIs are in their expanded states.
- E2E tests added.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7361
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-04-04 14:38:54 +00:00
Gusted
53df0bf9a4 chore(sec): unify usage of crypto/rand.Read (#7453)
- Unify the usage of [`crypto/rand.Read`](https://pkg.go.dev/crypto/rand#Read) to `util.CryptoRandomBytes`.
- Refactor `util.CryptoRandomBytes` to never return an error. It is documented by Go, https://go.dev/issue/66821, to always succeed. So if we still receive a error or if the returned bytes read is not equal to the expected bytes to be read we panic (just to be on the safe side).
- This simplifies a lot of code to no longer care about error handling.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7453
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-04 03:31:37 +00:00
4383c403c9 Drag and Drop UI: Modifies the SanitizePath approach for path handed over from dropzone.js. Add tests to check the algorithm. 2025-04-04 01:43:23 +02:00
Gnarwhal
d28a64e538 fix: handle viewing a submodule entry (#7261)
- When trying to view a submodule directory via the normal `/src/branch/` path, generate a redirect link to the submodule location.
- Resolves forgejo/forgejo#5267

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7261
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Gnarwhal <git.aspect893@passmail.net>
Co-committed-by: Gnarwhal <git.aspect893@passmail.net>
2025-04-03 15:32:55 +00:00
famfo
77b0275572 feat(activitiypub): enable HTTP signatures on all ActivityPub endpoints (#7035)
- Set the right keyID and use the right signing keys for outgoing requests.
- Verify the HTTP signature of all incoming requests, except for the server actor.
- Caches keys of incoming requests for users and servers actors.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7035
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
2025-04-03 15:24:15 +00:00
Gusted
5706a2452e fix(ui): display user-friendly message for range error (#7420)
- Instead of displaying 'RangeError: Range' display 'x must be a number between $MIN and $MAX' when the validation fails for a range error check.
- Resolves forgejo/forgejo#3510
- Added integration testing.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7420
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-02 15:48:09 +00:00
Gusted
f691f03741 chore(ui): remove fomantic's dimmer module (#7416)
- Fomantic's dimmer module is responsible for dimming the page and make some element the primary focus on the page (e.g. modal). This module is only used by Fomantic's modal module.
- Remove it and replace the javascript with our own `Dimmer` class that is able to provide Fomantic's modal module with everything it needs.
- Replace the CSS with our own bare minimum CSS.
- No functionality or visual is affected by this replacement.
- E2E test added.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7416
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-02 12:54:54 +00:00
0ko
6ad625b0c1 feat(ui): make JS asset load error message translatable (#7388)
- The 'Failed to load asset files from [...]' is now an translatable string.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7388
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-04-01 16:14:38 +00:00
Gusted
4b56c05e65 fix: validate input for default_{merge,update}_style (#7395)
- Add `binding:"In(...)"` to the `default_merge_style` and `default_update_style` fields to only accept recognized merge and update styles.
- Resolves https://codeberg.org/forgejo/forgejo/issues/7389
- Added integration test for the API (`binding` works in the exact same way for the API and web routes).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7395
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-31 03:33:18 +00:00
Ellen Emilia Anna Zscheile
b0dd490ae1 feat(repo,locale): merge PR/issues cases for some repo/issue strings (#7092)
- Merge `archive.nocomment` and `comment.blocked_by_user`'s variants for issue and pull request to a unified string and no longer have a issue and pull request variant.
- Fixes #6443

Signed-off-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7092
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Co-committed-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
2025-03-30 21:58:34 +00:00
Gusted
3769259c93 chore: use dynamic id (#7396)
- Follow up forgejo/forgejo#7378
- See https://codeberg.org/forgejo/forgejo/pulls/7378#issuecomment-3167157

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7396
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-30 21:41:33 +00:00
Gusted
5275fbd4ea fix(ui): clarify repo init instruction for sha256 (#7394)
- When the repository is initalized with a different objectformat than sha1, ensure that the empty repository instructions reflects that the `git init` command also needs to be initialized with that objectformat.
- Resolves https://codeberg.org/codeberg/community/issues/1837
- Added integration test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7394
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-30 18:08:05 +00:00
Gusted
7baf9994bd chore: improve repo migrate e2e test (#7378)
- Generate a repository name for each run, such that retries will use a new repository and not have any leftover.
- Make the test actually pass by ensuring the unauthenticated page didn't reuse storage state that contained authenticated cookies.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7378
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-30 14:48:52 +00:00
pat-s
63a80bf2b9 feat: use XORM EngineGroup instead of single Engine connection (#7212)
Resolves #7207

Add new configuration to make XORM work with a main and replicas database instances. The follow configuration parameters were added:

- `HOST_PRIMARY`
- `HOST_REPLICAS`
- `LOAD_BALANCE_POLICY`. Options:
    - `"WeightRandom"` -> `xorm.WeightRandomPolicy`
    - `"WeightRoundRobin`  -> `WeightRoundRobinPolicy`
    - `"LeastCon"` -> `LeastConnPolicy`
    - `"RoundRobin"` -> `xorm.RoundRobinPolicy()`
    - default: `xorm.RandomPolicy()`
- `LOAD_BALANCE_WEIGHTS`

Co-authored-by: pat-s <patrick.schratz@gmail.com@>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7212
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-03-30 11:34:02 +00:00
0ko
a23d0453a3 feat(ui/migrations): clarify desired autocompletion type for clone_addr (#7377)
* Firefox thinks that this is a login form and that `clone_addr` is it's username field
* It would have been an easy fix with with `autocomplete="off"`, but there's an issue with that approach:  Firefox plays a cat-mouse game with web developers and intentionally ignores `autocomplete="off"` "for users' security".
* Set it to the `url` autocompletion type, Firefox and maybe other browsers give actually somewhat relevant completion entries. They will not be always relevant, but they may be when a migration has to be re-done with different settings.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7377
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-03-30 11:31:42 +00:00
Gusted
51caba694a fix(ui): prepend AppSubURL to visibility hint URLs (#7379)
- If configured, add `AppSubUrl` to the visibility hint URLs shown to the user on the profile activity page.
- Resolves https://codeberg.org/forgejo/forgejo/issues/7327
- Integration testing adjusted.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7379
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-30 05:04:36 +00:00
YuviPanda
c9853e9e3a fix: ignore trailing slash for autogenerated name (#7307)
- During the migration process, if a valid GitHub clone URL was pasted, https://github.com/yuvipanda/notebooksharing.space/, the form automatically generates an invalid Forgejo repository name that included the trailing slash.
- Change the regex used to generate the name to ignore the trailing slash.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7307
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: YuviPanda <yuvipanda@gmail.com>
Co-committed-by: YuviPanda <yuvipanda@gmail.com>
2025-03-29 19:35:01 +00:00
Mat
8df8381f51 feat(ui/migrations): add placeholder to clarify empty description behavior (#7373)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7373
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Mat <m.falkowski@dotmat.de>
Co-committed-by: Mat <m.falkowski@dotmat.de>
2025-03-29 10:21:07 +00:00
0ko
bf8bdf12df chore(tests): refactor migration form test (#7374)
Ref https://codeberg.org/forgejo/forgejo/pulls/7373.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7374
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-03-29 09:06:03 +00:00
0ko
49ea851da9 chore(tests): fix testing failure caused by dep update (#7376)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7376
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-03-29 08:17:44 +00:00
Renovate Bot
fed2d81c44 Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-03-28 22:22:21 +00:00
0ko
51ff4970ec ui: improve error pages (#7274)
* add testing
* make each page accessible via `/devtest/error`
* allow translating the `Page not found` part of the title
* code: improve consistency, remove unused
* devtest: put index page in a container to fix alignment
* 500: make navbar more like the real one, remove fake menu button
* deadcode: remove unused `func NotFound`: it was added in bdd32f152d and the only usage was removed in 1bfb0a24d8

Preview:
https://codeberg.org/attachments/1b75afb3-e898-410f-be02-f036a5400143

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7274
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
2025-03-28 19:50:43 +00:00
Gusted
5380f23dab chore: use correct import (#7371)
- follow up for forgejo/forgejo#7355. It was merged before being rebased
on the forgejo branch

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7371
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-28 12:06:07 +00:00
ThomasBoom89
6cac7702e9 fix(api): encode empty requested reviewers as an empty array (#7355)
- Always initialize `RequestedReviewers` and `RequestedReviewersTeams`, this avoids the JSON encoder from encoding it to the zero value `null` and instead return a empty array.
- Resolves #4108
- Integration test added.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7355
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: ThomasBoom89 <thomasboom89@noreply.codeberg.org>
Co-committed-by: ThomasBoom89 <thomasboom89@noreply.codeberg.org>
2025-03-28 11:50:05 +00:00
Gusted
2457f5ff22 chore: branding import path (#7337)
- Massive replacement of changing `code.gitea.io/gitea` to `forgejo.org`.
- Resolves forgejo/discussions#258

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7337
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-27 19:40:14 +00:00
Gusted
e84d3a0f53 fix(ui): Do not check for vertical-align (#7344)
- This makes the `repo-settings` e2e testing happy.
- There's no point into checking `vertical-align`; it has no effect when `position: absolute` is set, which is is currently set unconditionally for checkboxes and radios on forms.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7344
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-26 13:08:03 +00:00
klausfyhn
c531b8f020 feat(api): return run_number in workflow dispatch (#7286)
- This is a follow up on #7193 and resolves #6312.
- The ID by itself is not very useful, so also return the index of the workflow run.

Co-authored-by: Klaus Fyhn <klausfyhn@gmail.com>
Co-authored-by: Klaus Fyhn <klfj@mir-robots.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7286
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: klausfyhn <klausfyhn@noreply.codeberg.org>
Co-committed-by: klausfyhn <klausfyhn@noreply.codeberg.org>
2025-03-25 21:22:32 +00:00
fauno
2cd9872b10 Include platform information on rubygems compact index API #6507 (#7257)
Per #6507, platform information was missing from the rubygems package registry, so binary gems where not served correctly. This change adds the platform information when necessary.

Co-authored-by: f <f@sutty.nl>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7257
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: fauno <fauno@noreply.codeberg.org>
Co-committed-by: fauno <fauno@noreply.codeberg.org>
2025-03-19 11:28:55 +00:00
Gusted
e2aa9adad7 feat(api): add more sorting to own repository list (#7256)
- Add more sorting options, by leveraging the existing `repo_model.OrderByFlatMap` map, to the `/api/v1/user/repos` endpoint.
- Swagger has been updated.
- Add (non-exhaustive) integration testing.
- Ref: gitnex/GitNex#1266

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7256
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-17 20:03:24 +00:00
Gusted
7d6d4f94ee feat(api): add sort parameter to list issues API (#7211)
- Add the `sort` parameter to the `/api/v1/{repo}/{owner}/issues` API endpoint. Default behavior is preserved.
- Resolves forgejo/forgejo#4173
- Add (non-exhaustive) integration testing.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7211
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-17 09:02:57 +00:00
Gusted
d5c8091e08 perf: optimize converting releases to feed items (#7221)
- `releasesToFeedItems` is called to convert release structs to feed items, which is then used to render RSS or Atom feeds.
- Optimize the loading of attributes for the releases, introduce `ReleaseList` type which uses caching to load repository and publishers. It also no longer loads release attachments and downloads counts as that is not used in feed items.
- Optimize the composing of meta by introducing caching, this operation is especially slow when the owner is an organization.
- Add unit test (ensures new `LoadAttributes` works correctly).
- Add integration test (ensures that feed output is still as expected).

Loading https://codeberg.org/forgejo/forgejo/releases.rss reduced from ~15s to ~1s. (It is currently is deployed on codeberg.org)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7221
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-17 09:00:34 +00:00
markturney
7a19d3c2be feat(api): return run info for dispatched workflows (#7193)
- When the API endpoint `/repos/{owner}/{repo}/actions/workflows/{workflowname}/dispatches` is used to launch a workflow, it currently returns no data; `/repos/{owner}/{repo}/actions/tasks` can be used to track the progress of a workflow, but you need at least that workflow's run_id and the quantity of its child jobs. Tracking workflow progress is especially important if you want to chain together multiple workflows that exist within different repositories, which is desired for https://codeberg.org/forgejo/forgejo/issues/6312.
- Make it possible to track the progress of manually triggered workflows by modifying the `/repos/{owner}/{repo}/actions/workflows/{workflowname}/dispatches` to return a JSON object containing the triggered workflow's id and a list of its child job names.

Co-authored-by: Andrii Chyrva <achyrva@amcbridge.com>
Co-authored-by: Andrii Chyrva <andrii.s.chyrva@hotmail.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7193
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: markturney <markturney@gmail.com>
Co-committed-by: markturney <markturney@gmail.com>
2025-03-14 16:01:15 +00:00
Shiny Nematoda
3816db68aa feat(code search): replace fuzzy search with union search for indexer (#6947)
Fuzzy searching for code has been known to be problematic #5264 and in my personal opinion isn't very useful.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6947
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2025-03-11 21:22:51 +00:00
davrot
8f5c3b2227 Dateien nach „tests/integration“ hochladen 2025-03-11 00:42:26 +00:00
davrot
a3620f4fe9 tests/integration/empty_repo_test.go aktualisiert 2025-03-11 00:31:30 +00:00
davrot
aed092240e tests/integration/editor_test.go aktualisiert 2025-03-11 00:21:24 +00:00
davrot
90a92c0332 tests/integration/empty_repo_test.go aktualisiert 2025-03-11 00:09:45 +00:00
David Rotermund
c1e5e3c834 Merge branch 'forgejo' into upload_with_path_structure 2025-03-09 17:22:59 +00:00
davrot
fc628bb603 tests/e2e/repo-files.test.e2e.ts aktualisiert 2025-03-09 17:20:14 +00:00
0ko
584c504e25 feat(ui): localize theme names (#7168)
Allow translating theme names. Not even for i18n reasons but because this way the menu is clearer and cleaner.

The number of translated entries is kept minimal for now. It is easy to pollute locales with these names otherwise.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7168
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-03-09 15:12:30 +00:00
Gusted
f015c00ecb fix: no notification for replies to pending comments (#7167)
- Replies to pending review comments no longer generate a notification, this was caused by an incomplete determination if the comment was part of the pending review or not.
- The logic was reworked to do the following if it's part of a pending review: It is not a single review and if it's a reply then the comment it is replying to is part of a pending review.
- Added integration test.
- Resolves forgejo/forgejo#7151

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7167
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-09 15:07:12 +00:00
Gusted
9073ca8128 fix: revert issue rendering for <a> element (#7171)
- Issue title rendering can lead to nested `<a>` which is incorrect. So
revert a portion of forgejo/forgejo#6715.
- Integration test adjusted
- Resolves forgejo/forgejo#7076

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7171
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-09 15:06:16 +00:00
Gusted
eb78c6618b i18n: use ellipsis character (#7154)
- Instead of using `...`, use the unicode character for ellipsis `…`.
- According to weblate: Using the Unicode character is in most cases the better approach and looks better rendered, and may sound better with text-to-speech.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7154
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-08 14:42:14 +00:00
0ko
9cef129f6b feat(ui themes): better place for theme list ctx, testing (#7163)
`AllThemes` is only used by `user/settings/appearance.tmpl`, not by all settings pages.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7163
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-03-08 12:54:08 +00:00
Dmitrii Sharshakov
30982b9e7b feat(auth): add ability to regenerate access tokens (#6963)
- Add the ability to regenerate existing access tokens in the UI. This preserves the ID of the access token, but generates a new salt and token contents.
- Integration test added.
- Unit test added.
- Resolves #6880

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6963
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Co-committed-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-03-08 10:42:36 +00:00
Otto Richter
9dea54a9d6 Drop SSPI auth support and more Windows files (#7148)
## Dropping SSPI auth support

SSPI authentication relied on Microsoft Windows support, removal started in https://codeberg.org/forgejo/forgejo/pulls/5353, because it was broken anyway. We have no knowledge of any users using SSPI authentication. However, if you somehow managed to run Forgejo on Windows, or want to upgrade from a Gitea version which does, please ensure that you do not use SSPI as an authentication mechanism for user accounts. Feel free to reach out if you need assistance.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7148
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Otto Richter <otto@codeberg.org>
Co-committed-by: Otto Richter <otto@codeberg.org>
2025-03-08 00:43:41 +00:00
Gusted
a2958f5a26 fix: consider public issues for project boards (#7143)
- The security patch of forgejo/forgejo#6843 fixed the issue where project boards loaded all issues without considering if the doer actually had permission to view that issue. Within that patch the call to `Issues` was modified to include this permission checking.
- The query being generated was not entirely correct. Issues in public repositories weren't considered correctly (partly the fault of not setting `AllPublic` unconditionally) in the cause an authenticated user loaded the project.
- This is now fixed by setting `AllPublic` unconditionally and subsequently fixing the `Issue` function to ensure that the combination of setting `AllPublic` and `User` generates the correct query, by combining the permission check and issues in public repositories as one `AND` query.
- Added unit testing.
- Added integration testing.
- Resolves Codeberg/Community#1809
- Regression of https://codeberg.org/forgejo/forgejo/pulls/6843

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7143
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-06 23:26:08 +00:00
Otto Richter
b9f3138e08 fix lint
Some checks failed
Integration tests for the release process / release-simulation (push) Has been cancelled
2025-03-07 00:02:45 +01:00