[PR #4719] [MERGED] Fixed bug where team with admin privelege type doesn't get any unit #17474

Closed
opened 2025-11-02 13:35:23 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4719
Author: @adelowo
Created: 8/15/2018
Status: Merged
Merged: 8/21/2018
Merged by: @techknowlogick

Base: masterHead: fix_team_admin_permissionn


📝 Commits (6)

  • 765eec4 Fixed bug where team with admin privelege type doesn't get any unit attached to the
  • 1fb7009 Merge branch 'master' of https://github.com/go-gitea/gitea into fix_team_admin_permissionn
  • 79ae98b Merge branch 'master' into fix_team_admin_permissionn
  • ca82226 Merge branch 'master' into fix_team_admin_permissionn
  • 3937dea Merge branch 'master' into fix_team_admin_permissionn
  • bebd25d Merge branch 'master' into fix_team_admin_permissionn

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 routers/org/teams.go (+3 -2)

📄 Description

Fixes #4713

It turns out in the database team_units , the team units are not being stored in the db when the t.Authorize is of type AccessModeAdmin... There is a for loop that makes a slice of units but that for loop never runs because ( take x to be AccessModeAdmin ( from f24ba27d79/models/access.go (L41) ) x < AccessModeAdmin would then equal false.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4719 **Author:** [@adelowo](https://github.com/adelowo) **Created:** 8/15/2018 **Status:** ✅ Merged **Merged:** 8/21/2018 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `fix_team_admin_permissionn` --- ### 📝 Commits (6) - [`765eec4`](https://github.com/go-gitea/gitea/commit/765eec4f148e3b30f67d2c58cb5a648a4f0a7125) Fixed bug where team with admin privelege type doesn't get any unit attached to the - [`1fb7009`](https://github.com/go-gitea/gitea/commit/1fb7009837f1b93287d946f922a51f158e944c06) Merge branch 'master' of https://github.com/go-gitea/gitea into fix_team_admin_permissionn - [`79ae98b`](https://github.com/go-gitea/gitea/commit/79ae98b605d93e11ee98da366b1ee9395e068803) Merge branch 'master' into fix_team_admin_permissionn - [`ca82226`](https://github.com/go-gitea/gitea/commit/ca82226add80095359565041d13311c9762f0758) Merge branch 'master' into fix_team_admin_permissionn - [`3937dea`](https://github.com/go-gitea/gitea/commit/3937dead8259e31f6b486c2fb38e2db9d0252494) Merge branch 'master' into fix_team_admin_permissionn - [`bebd25d`](https://github.com/go-gitea/gitea/commit/bebd25d7cc7b9d2efa4f8cfe9bd52a4f4357d375) Merge branch 'master' into fix_team_admin_permissionn ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `routers/org/teams.go` (+3 -2) </details> ### 📄 Description Fixes #4713 It turns out in the database `team_units` , the team units are not being stored in the db when the `t.Authorize` is of type `AccessModeAdmin`... There is a for loop that makes a slice of units but that for loop never runs because ( take `x` to be `AccessModeAdmin` ( from https://github.com/go-gitea/gitea/blob/f24ba27d79d02c197ff5f11283010b681ec3579d/models/access.go#L41 ) `x` < `AccessModeAdmin` would then equal false. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 13:35:24 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17474