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

4603 Commits

Author SHA1 Message Date
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ae8a64cd74
add group id segment to repository's Link method 2026-04-02 20:00:57 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
e2c6623244
add group ID column to repository table's unique constraint 2026-04-02 20:00:57 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7a8db72e63
update FullName method to show group id if it's non-zero 2026-04-02 20:00:57 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
d1af473553
update repository storage layout as per https://github.com/go-gitea/gitea/issues/1872#issuecomment-3194681583 2026-04-02 20:00:56 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
bc494f09ba
add indices to group_id and group_sort_order column
add migration for repository table
2026-04-02 20:00:56 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
57c38a49fb
fix more failing tests 2026-04-02 20:00:56 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
6bacfbd5d0
rename test fixture files for group units and teams 2026-04-02 20:00:55 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2a95d59da5
add/remove more constraints for mssql/mysql compatibility 2026-04-02 20:00:55 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
fc62111225
add explicit TEXT type to Group.LowerName tag 2026-04-02 20:00:55 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f598f125c8
remove UNIQUE constraint on Group.LowerName 2026-04-02 20:00:55 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
365769e2f7
fix bug where builder.In cond for groups and teams was not placed into the builder.Or cond 2026-04-02 20:00:55 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
6bb7598555
ensure we return early if there was an error loading group units 2026-04-02 20:00:55 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
3bbefda427
fix failing tests ?
i think they're caused by group permissions causing more repos to be returned than before
2026-04-02 20:00:54 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
271b6c7cae
fix build and lint errors 2026-04-02 20:00:54 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ab817e4251
add api routes and functions to get a repository group's subgroups and repos 2026-04-02 20:00:54 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
08e4236dc7
remove bare return 2026-04-02 20:00:53 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
923e84d4e5
update AccessibleGroupCondition function to take a minimum perm.AccessMode as a parameter 2026-04-02 20:00:53 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
401e633f01
rename tables in group-related query conditions 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 ◦❧
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 ◦❧
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 ◦❧
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 ◦❧
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 ◦❧
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 ◦❧
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