0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-05 01:21:17 +02:00

20588 Commits

Author SHA1 Message Date
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
3bed6a4452
update repo service to check that GroupID is owned by the repo owner when creating a new repository 2026-04-02 20:00:52 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
01dace952d
apply simple linting changes 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f627e57199
apply simple linting changes 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
47531417e9
add ownership check when moving repository to a new group 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4ebc1e3da1
reapply changes wiped out by conflict resolution 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
fc646e84cd
format files 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
303f2b79da
regenerate swagger definitions 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7c2dad2b4c
fix a few more build errors 2026-04-02 20:00:50 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
01f7c9407b
add api types for groups 2026-04-02 20:00:50 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c84d2277de
fix more build errors 2026-04-02 20:00:50 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
0f6bd6bc5e
add GroupID and GroupSortOrder fields to Repository api struct 2026-04-02 20:00:50 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ca07e052c1
fix build error caused by changed function name 2026-04-02 20:00:50 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2066f91862
add GroupID field to CreateRepoOptions 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
3711d573e6
fix deadlock caused by differing contexts when retrieving group ancestry with ParentGroupCond/GetParentGroupChain when using a sqlite db 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
1f46d46151
add some unit tests for group service 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c934365546
fix no columns found to update error when recalculating group access 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5472587c3a
add test fixtures 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
eb402b94d5
add missing nil check before IsErrGroupNotExist call 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
86d1826527
[services] update MoveGroupItem function to set newPos to the length of the new parent's subgroups/repositories 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f3199df895
add UpdateGroup function 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
11b5e75b92
remove unused/redundant IsPrivate field from Group struct 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
69a36a32e9
fix bug where all repos are returned even when opts.GroupID == 0 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
eaee8f07b1
fix duplicate teams being returned by GetTeamsWithAccessToGroup 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7f3e776867
[misc] update avatar utils to handle group avatars 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
e7fa8649c4
[services] ensure OwnerName field is updated in groups owned by an org when its name is updated 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4ef0a905de
[models] update GetTeamRepositories to also return repositories accessible via group permissions 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
e2f5ca92ac
[models/conds] update some repo conditions to check for access provided via groups 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
401561784e
[models/conds] add functions returning builders to help find repos matching various group-related conditions 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
e998ea34e4
[models/search-options] add GroupID to SearchRepoOptions 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
987cf89cd3
add group-related url segments to list of reserved usernames 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
a8da652180
update team_list.go
add `GetUserGroupTeams` function
2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4690164a3f
add file with functions relating to organization teams and repo groups 2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
af1da2447d
add conversion functions for repository groups 2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
55e745a147
update repo_permission.go
change `GetUserRepoPermission` to check for permissions granted/denied by groups
2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
cf712d465c
[models] update repo model
add `GroupID` and `GroupSortOrder` fields
2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
b2f13f5fb1
remove unused parameter from Group.relAvatarLink method 2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ae4c13529c
update group_unit.go
- export `GetUnitsByGroupID`
- add `GetGroupUnit` function to retrieve a specific unit in a group
- add `GetMaxGroupUnit` function that returns a specific type of group unit with the highest permissions granted
2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4fc767c815
add new fields and methods to GroupTeam model
- add `CanCreateIn` field, which determines whether a team can create new subgroups or repositories within a group
- add `AccessMode` field that determines a team's general access level to a group (as opposed to a specific unit)
- add `UpdateTeamGroup` function that either updates or adds a `GroupTeam` to the database
- update `HasTeamGroup` to also check that a team's access level is >= `AccessModeRead`
2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
a35d412491
add UserOrgTeamPermCond function
this returns group ids where a user has permissions greater than or equal to `level`
2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
608fb4326d
update group model
- add `SortOrder` field to `Group` struct (to allow drag-and-drop reordering to persist across refreshes)
- add method to return `/org/` prefixed url to group
- refactor `FindGroupsByCond` to take `FindGroupOptions` as an argument to be chained to the provided condition
- ensure that found groups are sorted by their `SortOrder` field
- modify `LoadParentGroup` method to immediately return nil if `ParentGroupID` is 0
- add permission-checking utility methods `CanAccess`, `IsOwnedBy`,`CanCreateIn` and `IsAdminOf`
- add `ShortName` method that returns an abbreviated group name
- add `GetGroupByRepoID`
- create `CountGroups` function
- create `UpdateGroupOwnerName` helper function to be called when a user changes their username
- refactor `MoveGroup` to allow moving a group to the "root" level (`ParentGroupID` = 0)
2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
96feb682fe
changes
* move error-related code for groups to its own file

* update group avatar logic

remove unused/duplicate logic

* update `FindGroupsOptions.ToConds()`

allow passing `-1` as the `ParentGroupID`, meaning "find matching groups regardless of the parent group id"

* add `DedupeBy` function to container module

this removes duplicate items from a slice using a custom function

* add `SliceMap` util

works like javascripts's `Array.prototoype.map`, taking in a slice and transforming each element with the provided function

* add group service

functions included so far:
- avatar uploading/deletion
- group deletion
- group creation
- group moving (including moving item inside a group)
- group update
- team management
  - add team
  - remove team
  - update team permissions
  - recalculating team access (in event of group move)
- group searching (only used in frontend/web components for now)
2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
1246721523
add condition and builder functions to be used when searching for groups 2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c1266b6a6b
register GroupTeam and GroupUnit models 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5b1e66c712
refactor subgroup loading, add method to load only groups accessible by a user 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5bc2e43f96
add helper functions for dealing with group hierarchies 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2760a0e29f
add GroupLink method to Group struct 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2ffbc4d2c0
fix nonexistent variable reference in GetGroupByID function 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
0ed90f83f9
add FindGroupsByCond helper function 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
b598db7608
add IsPrivate and Visibility fields to Group struct 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
22118316ec
rename DisplayName -> FullName for consistency 2026-04-02 20:00:43 -04:00