0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-11 11:25:42 +02:00

20967 Commits

Author SHA1 Message Date
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
d77110a1a8
update repo service to check that GroupID is owned by the repo owner when creating a new repository 2026-05-08 18:55:21 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
114dcb5d7b
apply simple linting changes 2026-05-08 18:55:21 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5fcd1e17d4
apply simple linting changes 2026-05-08 18:55:21 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
bfaf513d13
add ownership check when moving repository to a new group 2026-05-08 18:55:21 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f2758da1cf
reapply changes wiped out by conflict resolution 2026-05-08 18:55:20 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
057df87eef
format files 2026-05-08 18:55:20 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
8db609a265
regenerate swagger definitions 2026-05-08 18:55:20 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
24f5179d33
fix a few more build errors 2026-05-08 18:55:20 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
0e292f2100
add api types for groups 2026-05-08 18:55:20 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5f3c500637
fix more build errors 2026-05-08 18:55:19 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2159d0ede6
add GroupID and GroupSortOrder fields to Repository api struct 2026-05-08 18:55:19 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c986da2a46
fix build error caused by changed function name 2026-05-08 18:55:19 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
fb46b59a8e
add GroupID field to CreateRepoOptions 2026-05-08 18:55:19 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5e69c93f60
fix deadlock caused by differing contexts when retrieving group ancestry with ParentGroupCond/GetParentGroupChain when using a sqlite db 2026-05-08 18:55:19 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c160fe8ee5
add some unit tests for group service 2026-05-08 18:55:19 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
93c9998da7
fix no columns found to update error when recalculating group access 2026-05-08 18:55:18 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
bda02523b9
add test fixtures 2026-05-08 18:55:18 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
b2c3acc8c0
add missing nil check before IsErrGroupNotExist call 2026-05-08 18:55:18 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
21eac079bc
[services] update MoveGroupItem function to set newPos to the length of the new parent's subgroups/repositories 2026-05-08 18:55:18 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
78d76049bb
add UpdateGroup function 2026-05-08 18:55:18 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c0b35ae8b4
remove unused/redundant IsPrivate field from Group struct 2026-05-08 18:55:18 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ed0d5b0cba
fix bug where all repos are returned even when opts.GroupID == 0 2026-05-08 18:55:17 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
cafc218e90
fix duplicate teams being returned by GetTeamsWithAccessToGroup 2026-05-08 18:55:17 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c3c61fca11
[misc] update avatar utils to handle group avatars 2026-05-08 18:55:17 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
60c63bd5c8
[services] ensure OwnerName field is updated in groups owned by an org when its name is updated 2026-05-08 18:55:17 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
24e7df8df4
[models] update GetTeamRepositories to also return repositories accessible via group permissions 2026-05-08 18:55:17 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
1fc3e005fb
[models/conds] update some repo conditions to check for access provided via groups 2026-05-08 18:55:17 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c0898cc0e3
[models/conds] add functions returning builders to help find repos matching various group-related conditions 2026-05-08 18:55:16 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
09b5fa6e87
[models/search-options] add GroupID to SearchRepoOptions 2026-05-08 18:55:16 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2f7ecb1f60
add group-related url segments to list of reserved usernames 2026-05-08 18:55:16 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
0521a0e06d
update team_list.go
add `GetUserGroupTeams` function
2026-05-08 18:55:16 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
58126232fc
add file with functions relating to organization teams and repo groups 2026-05-08 18:55:16 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
423ef4c09c
add conversion functions for repository groups 2026-05-08 18:55:16 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ba37aa8514
update repo_permission.go
change `GetUserRepoPermission` to check for permissions granted/denied by groups
2026-05-08 18:55:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
31c66733c3
[models] update repo model
add `GroupID` and `GroupSortOrder` fields
2026-05-08 18:55:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ea8e52b9ee
remove unused parameter from Group.relAvatarLink method 2026-05-08 18:55:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2148a9f48d
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-05-08 18:55:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
652c1deac5
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-05-08 18:55:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
1387922420
add UserOrgTeamPermCond function
this returns group ids where a user has permissions greater than or equal to `level`
2026-05-08 18:55:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
d8cedf18d8
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-05-08 18:55:14 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
bc4e4840b2
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-05-08 18:55:14 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
306f083327
add condition and builder functions to be used when searching for groups 2026-05-08 18:55:14 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
501bf33cbd
register GroupTeam and GroupUnit models 2026-05-08 18:55:14 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
e8fe57571a
refactor subgroup loading, add method to load only groups accessible by a user 2026-05-08 18:55:14 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
af769893ce
add helper functions for dealing with group hierarchies 2026-05-08 18:55:14 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
27084f4cc1
add GroupLink method to Group struct 2026-05-08 18:55:13 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
9aeb53c84c
fix nonexistent variable reference in GetGroupByID function 2026-05-08 18:55:13 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4480c4d221
add FindGroupsByCond helper function 2026-05-08 18:55:13 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7a8c2bf93a
add IsPrivate and Visibility fields to Group struct 2026-05-08 18:55:13 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7e2bc0d143
rename DisplayName -> FullName for consistency 2026-05-08 18:55:13 -04:00