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

44 Commits

Author SHA1 Message Date
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ab1eb20ab3
run formatter and fix lint errors 2026-04-02 20:44:11 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
bb55e2db5c
add ability to search for repository activity based on repo groups 2026-04-02 20:34:41 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
15446db55a
add methods for retrieving nesting depth and generating a left padding CSS value to Group struct 2026-04-02 20:31:56 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
b0257d1468
fix: update CanAccessAtLevel func
ensure that public groups can always be accessed if requested level == read
2026-04-02 20:01:13 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
436b04fe0e
fix: update accessible group cond
ensure that org owners and site admins can always see all groups
2026-04-02 20:01:13 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
55ca263b89
fix failing tests 2026-04-02 20:01:12 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
6f76360208
fix group team unit query 2026-04-02 20:01:12 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
83d982cc38
add function to find teams a user is part of within a group 2026-04-02 20:01:11 -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 ◦❧
6bb7598555
ensure we return early if there was an error loading group units 2026-04-02 20:00:55 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
271b6c7cae
fix build and lint errors 2026-04-02 20:00:54 -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 ◦❧
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 ◦❧
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 ◦❧
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
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
a575f9390e
add OwnerName field to Group struct 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
de1ef4df59
add condition and builder functions to be used when searching for groups 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5bb8e6e766
add GroupTeam and GroupUnit structs and helpers 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4328885e9b
add ParentGroup field and related LoadParentGroup method to Group struct 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
807028a194
add avatar to group 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
1483e507ad
add Group methods and helper functions 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f5db8e64b3
create GroupList type and methods 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4655483fb6
add group model 2026-04-02 20:00:42 -04:00