20b6ae0e53
Add project type descriptions in issue badge and improve project icons ( #23437 )
...
Changes:
- ~~Add project icons to issue badge~~
~~After:~~

Use `tooltip` to add a description of project type to the project name.

- improve project icons
we can use `project.icon` to get the svg name, which looks better and is
easy to change all of them in templates.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2023-04-21 17:15:17 -04:00
8ea33baa1c
Introduce eslint-plugin-no-jquery/no-event-shorthand ( #24198 )
...
https://github.com/go-gitea/gitea/pull/24098#issuecomment-1514010690
---------
Co-authored-by: silverwind <me@silverwind.io >
2023-04-20 05:28:27 -04:00
da6e9f63df
Add owner team permission check test ( #24096 )
...
Add test for https://github.com/go-gitea/gitea/pull/23675
Should be merged after #24117
---------
Co-authored-by: silverwind <me@silverwind.io >
2023-04-19 19:19:13 -04:00
yp05327 and GitHub
f30cc9faa9
Add unset default project column ( #23531 )
...
Close: https://github.com/go-gitea/gitea/issues/23401
2023-04-19 10:28:28 -04:00
yp05327 and GitHub
01214c8ada
Add runner check in repo action page ( #24124 )
...

Maybe we can also add online runner check? e.g. : Target runner is
offline.
2023-04-19 20:51:20 +08:00
yp05327 and GitHub
fa3495183b
Add migration to fix external unit access mode of owner/admin team ( #24117 )
...
Fix the incorrect migration in #23675 and #24012
External Unit (Tracker and Wiki) access mode should be `read` in
owner/admin team.
2023-04-15 09:52:44 -04:00
yp05327 and GitHub
5768bafeb2
Fix incorrect server error content in RunnersList ( #24118 )
2023-04-14 11:34:10 +08:00
yp05327 and GitHub
b7221bec34
Fix admin team access mode value in team_unit table ( #24012 )
...
Same as https://github.com/go-gitea/gitea/pull/23675
Feedback:
https://github.com/go-gitea/gitea/pull/23879#issuecomment-1500923636
2023-04-13 21:06:10 +02:00
yp05327 and GitHub
bb6c670cff
Add actions support to package auth verification ( #23729 )
...
Partly fixes https://github.com/go-gitea/gitea/issues/23642
Error info:

ActionsUser (userID -2) is used to login in to docker in action jobs.
Due to we have no permission policy settings of ActionsUser now,
ActionsUser can only access public registry by this quick fix.
2023-04-10 15:21:03 +08:00
yp05327 and GitHub
8bc8ca1953
Improve GetBoards and getDefaultBoard ( #22981 )
...
Change
`GetBoards(ctx context.Context, projectID int64)`
to
`(p *Project) GetBoards(ctx context.Context) (BoardList, error)`
`getDefaultBoard` is same.
2023-04-09 22:07:23 +08:00
yp05327 and GitHub
68aac691c1
Add job.duration in web ui ( #23963 )
...


Maybe we can change the location of it.
2023-04-07 18:20:50 -04:00
yp05327 and GitHub
26a0cd7143
Allow repo admins too to delete the repo ( #23940 )
...
Fixes https://github.com/go-gitea/gitea/issues/23934
We need to check `AccessModeAdmin` in `CanUserDelete` instead of
`AccessModeOwner`
2023-04-07 11:21:02 -04:00
bbf83f5d4b
Improve permission check of packages ( #23879 )
...
At first, we have one unified team unit permission which is called
`Team.Authorize` in DB.
But since https://github.com/go-gitea/gitea/pull/17811 , we allowed
different units to have different permission.
The old code is only designed for the old version. So after #17811 , if
org users have write permission of other units, but have no permission
of packages, they can also get write permission of packages.
Co-authored-by: delvh <dev.lh@web.de >
2023-04-06 22:18:29 +08:00
yp05327 and GitHub
01d9466bfd
Convert .Source.SkipVerify to $cfg.SkipVerify ( #23839 )
...
`Source` doesn't have `SkipVerify`, it is defined in `cfg`
2023-04-03 12:06:16 -04:00
yp05327 and GitHub
6eb856c614
Fix owner team access mode value in team_unit table ( #23675 )
...
All `access_mode` value of Owner Teams are 0(AccessModeNone) in
`team_unit` table, which should be 4(AccessModeOwner)
In `team` table:

In `team_unit` table:

ps: In https://github.com/go-gitea/gitea/pull/23630 , `access_mode` in
`team_unit` is used to check the team unit permission, but I found that
user can not see issues in owned org repos.
2023-04-03 10:36:35 -04:00
yp05327 and GitHub
29133f3d04
Fix submit button won't refresh in New Repository Fork page ( #22994 )
...
Fork a repo, and input an invalid repo name, you will get an error.
Then rename the repo name to a valid one, the submit button is still
disabled.
In other pages, for example, in create repo page, the submit button will
not be disabled.
So I removed the codes to disable the submit button.
2023-04-03 22:11:05 +08:00
yp05327 and GitHub
0ed62db213
Prefill input values in oauth settings as intended ( #23829 )
2023-04-02 21:08:34 +08:00
yp05327 and GitHub
6e58f8400e
Fix 500 error if there is a name conflict when edit authentication source ( #23832 )
2023-03-31 22:32:18 +08:00
yp05327 and GitHub
06d9d9e407
Fix incorrect/Improve error handle in edit user page ( #23805 )
...
Changes:
- `RenderWithErr` should render `tplUserEdit` not `tplUserNew` in edit
page
- If error occurred in `HandleUsernameChange` redirect to original edit
page instead of user list page
2023-03-30 13:27:00 -04:00
yp05327 and GitHub
c09eab5485
Fix incorrect visibility dropdown list in add/edit user page ( #23804 )
...
Visibility dropdown list will not work in add/edit user page when error
occurred
2023-03-30 12:29:57 -04:00
yp05327 and GitHub
22fec1650a
Add commit info in action page ( #23210 )
...
Add more commit info in action detail page.

2023-03-27 18:34:09 +08:00
yp05327 and GitHub
d673a6f832
Fix incorrect package doc link ( #23679 )
...
package doc link is changed in
https://github.com/go-gitea/gitea/pull/23629
2023-03-24 23:45:06 +08:00
1a4efa0ee9
Use project.IconName instead of repeated unreadable if-else chains ( #23538 )
...
The project type will be changed in
https://github.com/go-gitea/gitea/pull/23353 , so the old fix
https://github.com/go-gitea/gitea/pull/23325 will not work as well.
And I also found that there were some problems in the old fix....
---------
Co-authored-by: Lauris BH <lauris@nix.lv >
2023-03-19 14:44:48 +02:00
8e45fcb63a
Do not store user projects as organization projects ( #23353 )
...
A part of https://github.com/go-gitea/gitea/pull/22865
At first, I think we do not need 3 ProjectTypes, as we can check user
type, but it seems that it is not database friendly.
---------
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: 6543 <6543@obermui.de >
2023-03-17 21:07:23 +08:00
yp05327 and GitHub
06c067bb0f
Remove stars in dashboard repo list ( #23530 )
...
Discussion is here: https://github.com/go-gitea/gitea/pull/22816
2023-03-17 00:43:58 -04:00
aac07d010f
Add workflow error notification in ui ( #23404 )
...


---------
Co-authored-by: techknowlogick <matti@mdranta.net >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-03-14 15:27:03 +08:00
yp05327 and GitHub
d74a7efb60
Use context for RepositoryList.LoadAttributes ( #23435 )
2023-03-13 11:31:41 +00:00
yp05327 and GitHub
a04eeb2a54
Show edit/close/delete button on organization wide repositories ( #23388 )
...
A part of https://github.com/go-gitea/gitea/pull/22865
2023-03-12 14:36:47 +01:00
e72290fd9a
Sync the class change of Edit Column Button to JS code ( #23400 )
...
In #22767 , we changed the class of `Edit Column` button from `red` to
`primary`
But `red` is used to find this button in js.....
---------
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
Co-authored-by: zeripath <art27@cantab.net >
2023-03-12 19:09:20 +08:00
yp05327 and GitHub
cf29ee6dd2
Add missing tabs to org projects page ( #22705 )
...
Fixes https://github.com/go-gitea/gitea/issues/22676
Context Data `IsOrganizationMember` and `IsOrganizationOwner` is used to
control the visibility of `people` and `team` tab.
https://github.com/go-gitea/gitea/blob/2871ea08096cba15546f357d0ec473734ee9d8be/templates/org/menu.tmpl#L19-L40
And because of the reuse of user projects page, User Context is changed
to Organization Context. But the value of `IsOrganizationMember` and
`IsOrganizationOwner` are not being given.
I reused func `HandleOrgAssignment` to add them to the ctx, but may have
some unnecessary variables, idk whether it is ok.
I found there is a missing `PageIsViewProjects` at create project page.
2023-03-10 09:18:20 -06:00
yp05327 and GitHub
e6df743eca
Rename canWriteUnit to canWriteProjects ( #23386 )
...
A part of https://github.com/go-gitea/gitea/pull/22865
2023-03-09 13:57:20 -06:00
yp05327 and GitHub
689770c928
Fix incorrect NotFound conditions in org/projects.go ( #23384 )
...
A part of https://github.com/go-gitea/gitea/pull/22865
user/org project's `RepoID` is always 0, we need to check `OwnerID`
2023-03-09 10:59:50 -06:00
yp05327 and GitHub
e52ac62d8e
Redirect to project again after editing it ( #23326 )
...
A part of https://github.com/go-gitea/gitea/pull/22865
We have edit buttons in projects list page and project view page.
But after user edit a project, it will always redirect to the projects
list page.
2023-03-09 08:38:29 -06:00
d949d8e074
add user visibility in dashboard navbar ( #22747 )
...
Add private/limited tag to dashboard user/org list dropdown menu

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-03-08 23:18:10 +08:00
yp05327 and GitHub
e7b89888e1
Fix incorrect redirect link of delete org project ( #23327 )
...
A part of https://github.com/go-gitea/gitea/pull/22865/commits
The old code will cause 500 error.
2023-03-06 12:05:26 -06:00
yp05327 and GitHub
3f547c7afb
Fix incorrect project links and use symlink icon for org-wide projects ( #23325 )
...
Fix displaying same projects icons between user/repo projects.
And fix incorrect projects links.
A part of https://github.com/go-gitea/gitea/pull/22865 .



2023-03-06 10:32:56 -06:00
f0b0f22aed
Add ActionRunStatus component ( #23259 )
...
Related to:
https://github.com/go-gitea/gitea/pull/23212#discussion_r1122856231
Decrease duplication of SvgIcon when display a run status svg.
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-03-06 22:35:24 +08:00
yp05327 and GitHub
6864583957
Add default owner team to privated_org and limited_org in unit test ( #23109 )
...
Related to https://github.com/go-gitea/gitea/pull/22705 's CI result
[here](https://drone.gitea.io/go-gitea/gitea/68043/2/16 )
> IsOrganizationOwner() [E] [63f61849-7] Organization does not have
owner team: 23
2023-03-04 19:23:51 +00:00
ca84a61761
Add run status in action view page ( #23212 )
...
Before:


After:


---------
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2023-03-04 00:41:37 -05:00
699f20234b
Use correct README link to render the README ( #23152 )
...
`renderReadmeFile` needs `readmeTreelink` as parameter but gets
`treeLink`.
The values of them look like as following:
`treeLink`: `/{OwnerName}/{RepoName}/src/branch/{BranchName}`
`readmeTreelink`:
`/{OwnerName}/{RepoName}/src/branch/{BranchName}/{ReadmeFileName}`
`path.Dir` in
https://github.com/go-gitea/gitea/blob/8540fc45b11eff9a73753ca139f8ea5c38509bf5/routers/web/repo/view.go#L316
should convert `readmeTreelink` into
`/{OwnerName}/{RepoName}/src/branch/{BranchName}` instead of the current
`/{OwnerName}/{RepoName}/src/branch`.
Fixes #23151
---------
Co-authored-by: Jason Song <i@wolfogre.com >
Co-authored-by: John Olheiser <john.olheiser@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
2023-03-03 18:01:33 +08:00
0945bf63d3
Fix missed .hide class ( #23208 )
...
https://github.com/go-gitea/gitea/pull/22950 removed `hide` class, and
use `gt-hidden`
But there are some missed `hide`....
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-03-02 12:22:04 +08:00
6e90a1459b
Add word-break to sidebar-item-link ( #23146 )
...
Fixes https://github.com/go-gitea/gitea/issues/22953

Co-authored-by: delvh <leon@kske.dev >
2023-02-27 15:19:50 -05:00
f1bde2fe00
Return 404 instead of 403 if user can not access the repo ( #23155 )
...
Fixes https://github.com/go-gitea/gitea/issues/23150
Before:

After:

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-26 18:22:42 +08:00
yp05327 and GitHub
9eb61b77ac
Redirect to the commit page after applying patch ( #23056 )
...
Fixes https://github.com/go-gitea/gitea/issues/22621
2023-02-24 16:56:41 +00:00
5b87c05a95
improve FindProjects ( #23085 )
...
I found `FindAndCount` which can `Find` and `Count` in the same time
Maybe it is better to use it in `FindProjects`
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-24 13:18:52 +08:00
yp05327 and GitHub
ed954b070d
Fix commit name in Apply Patch page ( #23086 )
...
Fixes
https://github.com/go-gitea/gitea/issues/22621#issuecomment-1439309200
2023-02-23 15:14:07 -06:00
yp05327 and GitHub
4fcf3a3f90
Add me to maintainers ( #23026 )
...
Add me to maintainers.
[My PRs
list](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3Ayp05327+is%3Amerged+ )
2023-02-21 10:56:13 +08:00
yp05327 and GitHub
f4ce8c73fb
Improve issues.LoadProject ( #22982 )
...
issues.LoadProject() is no use
change `issues.loadProject(ctx)` to issues.LoadProject(ctx)
2023-02-20 13:21:56 -06:00
b811ab48e5
Add all units to the units permission list in org team members sidebar ( #22971 )
...
Add all units to the units permission list in org team members sidebar.
Before:

After:

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-20 15:08:33 +08:00
7eaf192967
Rename GetUnits to LoadUnits ( #22970 )
...
Same as https://github.com/go-gitea/gitea/pull/22967
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-19 16:31:39 +08:00
d5e417a33d
Fix no user listed in org teams page ( #22979 )
...
https://github.com/go-gitea/gitea/pull/22294 introduced this bug.
Before:

After:

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-19 12:57:49 +08:00
bd66fa586a
Rename repo.GetOwner to repo.LoadOwner ( #22967 )
...
Fixes https://github.com/go-gitea/gitea/issues/22963
---------
Co-authored-by: Yarden Shoham <hrsi88@gmail.com >
2023-02-18 20:11:03 +08:00
yp05327 and GitHub
7ae10cb7f1
change org_type.go to visible_type.go and fix the notes ( #22752 )
...
It seems `VisibleType` is only designed for org at first. But it is also
used by user's visibility now.
So I think `org_type.go` can be changed to `visible_type.go`.
2023-02-09 06:40:34 +00:00
c07199f9ab
remove update language in ProfilePost ( #22748 )
...
Fixes https://github.com/go-gitea/gitea/issues/22703
Change language has been moved to `UpdateUserLang`
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-06 00:06:26 +08:00
yp05327 and GitHub
e35f8e15a6
add default user visibility to cli command "admin user create" ( #22750 )
...
Fixes https://github.com/go-gitea/gitea/issues/22523
2023-02-04 17:35:04 +00:00
9ef8bfb69b
set user dashboard org visibility to basic ( #22706 )
...
Same to https://github.com/go-gitea/gitea/pull/22674 and
https://github.com/go-gitea/gitea/pull/22605
Sorry to create 3 PR to fix this.
I checked all span with class `org-visibility`, i think this is the last
one :)
And I found that private/limited user has no private/limited tag in
dashboard. but org does.
If it is ok i will add this feature in another pr.
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-02-02 14:53:14 +08:00
72a83dcc82
Explain that the no-access team unit does not affect public repositories ( #22661 )
...
Fixes https://github.com/go-gitea/gitea/issues/22600
Add explanations to team unit access control.
---------
Co-authored-by: Jason Song <i@wolfogre.com >
2023-02-01 16:14:40 +08:00
yp05327 and GitHub
f47ea60c07
set user visibility class to basic ( #22674 )
...
Same to https://github.com/go-gitea/gitea/pull/22605


These two page are both used at user and org, so if i fixed the org
page, the user page will be also be fixed.
2023-01-31 07:05:25 +00:00
yp05327 and GitHub
4f8c0eba9a
set org visibility class to basic in header ( #22605 )
...
Fixes https://github.com/go-gitea/gitea/issues/22601
At people and team page, we have red private tag or orange limited tag,
but at repo page, it is gray (basic).
I think it is better to set them into same color (basic).
2023-01-26 12:44:34 -06:00