Commit graph

14156 commits

Author SHA1 Message Date
harryzcy
a10b8dc28b
Add sudo token to /admin API 2022-11-02 01:07:11 -04:00
harryzcy
93fbca368e
Ensure token exists before running reqTeamMembership 2022-11-02 00:00:49 -04:00
harryzcy
2451accb56
Add scope to teams APIs 2022-11-01 23:33:48 -04:00
Chongyi Zheng
b6f6ad4cf0
Merge branch 'main' into access-token-scope 2022-11-01 22:27:34 -04:00
Gusted
4827f42f56 [skip ci] Updated translations via Crowdin 2022-11-02 00:19:48 +00:00
Gusted
c2d2323fc8
Configure update checker on installation page (#21655)
- I recently became aware that this was enabled by-default, I don't
necessary agree with that and this should rather be configured by the
user(this patch does that on the installation page) as it connects to a
homeserver, which I'd prefer to avoid on my instance.


![image](https://user-images.githubusercontent.com/25481501/199260613-a77a1b10-347a-4542-8982-9b9b24dad28c.png)
2022-11-01 19:23:56 +00:00
harryzcy
8f03691e0a
Fix TestAPIGetAll 2022-11-01 04:02:31 -04:00
harryzcy
8b0bc32902
Disallow unauthenticated call to users/{user}/orgs 2022-11-01 03:46:37 -04:00
harryzcy
45f716f5c8
Fix the scope required for /api/v1/orgs/{org}/teams 2022-11-01 02:38:44 -04:00
harryzcy
853eb68d23
One more fix 2022-11-01 02:04:09 -04:00
harryzcy
dc6ac14cc6
Fix some test but still have works to do 2022-11-01 01:47:34 -04:00
harryzcy
e8af871f98
Limit scope for /api/v1/orgs 2022-11-01 01:23:17 -04:00
zeripath
f211d235c7
Fix repository adoption on Windows (#21646)
A bug was introduced in #17865 where filepath.Join is used to join
putative unadopted repository owner and names together. This is
incorrect as these names are then used as repository names - which shoud
have the '/' separator. This means that adoption will not work on
Windows servers.

Fix #21632

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-10-31 23:16:48 +00:00
Xinyu Zhou
563945c50c
Refactor docs (#21627)
This patch:
- Rename some files( `.md` to `.en-us.md`), fix missed translation copy
- Update link which shoud be refer to `../hacking-on-gitea/` instead of
`../make/` (outdated)
- Update `_redirects`:
  -  redirect `/{zh-cn|fr-fr}/make/` to `../hacking-on-gitea/`
  - redirect `/zh-cn/third-party-tools/` to `/zh-cn/integrations/`
- Delete duplicated/outdated files.
- Update menu `weight` of developers.zh-cn.md

Signed-off-by: Xinyu Zhou <i@sourcehut.net>
2022-10-31 23:16:19 +00:00
melkor0
8f85a49947
Update "email usage" page to current ver. (1.18) (#21649)
In version 1.18 the naming scheme for smtp has been changed, HOST has
been split in SMTP_ADDR and SMTP_PORT
(https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer).
2022-10-31 22:02:37 +00:00
silverwind
57a0a7ef64
Fix opaque background on mermaid diagrams (#21642)
Browsers introduce a opaque background on iframes if the iframe
element's color-scheme does not match the document's color scheme which
in case of a dark theme results in a mismatch and the browser adds a
white background. Avoid this by specifying the same color scheme outside
and inside the iframe.

See https://fvsch.com/transparent-iframes for more info.

My initial attempt was to make the iframe document the same color-scheme
as the parent page (light or dark) but with that, there was a ugly
background flash on load in Chrome because Chrome apparently always
loads iframe in light scheme initially. Firefox still shows a background
flash on load but this is not possible to get rid of and it's certainly
a browser bug.

Before:
<img width="1147" alt="Screen Shot 2022-10-31 at 13 30 55"
src="https://user-images.githubusercontent.com/115237/199017132-9828aace-bdd0-4ede-8118-359e72bcf2fe.png">

After:
<img width="1152" alt="Screen Shot 2022-10-31 at 13 30 36"
src="https://user-images.githubusercontent.com/115237/199017137-989a9e67-3fe0-445f-a191-df5bf290dabf.png">
2022-10-31 20:57:31 +00:00
Lunny Xiao
9a70a12a34
Merge db.Iterate and IterateObjects (#21641)
These two functions are similiar, merge them.
2022-10-31 23:51:14 +08:00
Jason Song
4ae3f76217
Deal with markdown template without metadata (#21639)
Fixed #21636.

Related to #20987.

A markdown template without metadata should not be treated as an invalid
template.

And this PR fixed another bug that non-template files(neither .md nor
.yaml) are treated as yaml files.

<img width="504" alt="image"
src="https://user-images.githubusercontent.com/9418365/198968668-40082fa1-4f25-4d3e-9b73-1dbf6d1a7521.png">
2022-10-31 17:10:33 +02:00
Chongyi Zheng
9f2af77f53
Merge branch 'main' into access-token-scope 2022-10-31 08:44:56 -04:00
harryzcy
6d7e7e5a64
Fix package integration tests 2022-10-31 00:40:10 -04:00
harryzcy
f76259b22d
Add package scope for package APIs 2022-10-31 00:13:49 -04:00
harryzcy
0f25b04505
Cleanup one duplicated reqToken call 2022-10-30 22:47:42 -04:00
harryzcy
f45bfe3b4d
No token needed for some public info 2022-10-30 22:33:14 -04:00
harryzcy
0a8ab09258
Restrict repo scope to remaining repos endpoints 2022-10-30 21:54:55 -04:00
KN4CK3R
9b3e2c5450 [skip ci] Updated translations via Crowdin 2022-10-31 00:19:34 +00:00
harryzcy
d6d6d97520
Apply repo scope to more APIs 2022-10-30 19:09:50 -04:00
Chongyi Zheng
290b63d822
Merge branch 'main' into access-token-scope 2022-10-30 18:06:15 -04:00
harryzcy
11a51038ad
Include repo scope in TestMigrateGiteaForm 2022-10-30 17:43:08 -04:00
harryzcy
15ed960dc5
Fix several integration tests 2022-10-30 17:22:09 -04:00
harryzcy
62c9f70396
Limit repo scope on /api/v1/{user}/{repo}/issues 2022-10-30 16:57:11 -04:00
harryzcy
7a3b165485
Include copyright statement 2022-10-30 16:42:13 -04:00
harryzcy
f13904ade8
Reuse code in modules/util 2022-10-30 16:26:04 -04:00
harryzcy
37c59c9136
There are so many fixes 2022-10-30 15:46:42 -04:00
harryzcy
0ff93b83ec
Add fixes for delete_repo scope 2022-10-30 05:17:46 -04:00
harryzcy
b4c35e82bb
Fix typos that causes errors 2022-10-30 04:51:06 -04:00
harryzcy
755faf6402
Fix more integration tests 2022-10-30 04:33:55 -04:00
harryzcy
a44f62e262
Add repo scope to TestAPIRepoTeams 2022-10-30 03:32:11 -04:00
harryzcy
0a837e7e88
Include repo scope in TestAPIReposRaw 2022-10-30 02:54:55 -04:00
harryzcy
f376275b07
Fix the token for repo hooks 2022-10-30 02:38:03 -04:00
harryzcy
965de5327d
Fix more repo scope issues 2022-10-30 02:35:54 -04:00
harryzcy
182b984785
Fix repo scope in TestGPGKeys again 2022-10-30 02:12:46 -04:00
harryzcy
0bee969682
Add repo scope in TestGPGKeys 2022-10-30 01:32:34 -04:00
harryzcy
a282f02de6
Limit token scope for some repo APIs 2022-10-30 01:14:12 -04:00
harryzcy
0583e79f37
Add gpg key scope to a user test 2022-10-29 22:29:32 -04:00
harryzcy
f839856e3c
Fix git tests 2022-10-29 21:43:37 -04:00
harryzcy
99f30f6f16
Add more repo scope to integration tests 2022-10-29 21:19:06 -04:00
harryzcy
32cac396cf
Fix gpg key token name in web 2022-10-29 21:10:13 -04:00
harryzcy
1fe42fbe1a
Add repo scope to user/applications 2022-10-29 20:57:33 -04:00
harryzcy
800de93c47
Fix gpg key token tests 2022-10-29 20:43:49 -04:00
KN4CK3R
d33b2d473c [skip ci] Updated licenses and gitignores 2022-10-30 00:19:37 +00:00