You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we migrated to Gitea from a bunch of Git repos behind an Apache, we wrote some scripts to move all repos and create users and teams and so on. This worked fairly well, except those users don't have access to the repos (404).
When I debugged this locally, I discovered that no team_units are created when creating a repo using the api, which is why the users won't have access to the repo, whereas when doing this with the web ui, all units are created accordingly.
More specifically:
API:
2018/10/25 22:33:47 [I] [SQL] BEGIN TRANSACTION
2018/10/25 22:33:47 [I] [SQL] INSERT INTO `team` (`org_id`,`lower_name`,`name`,`description`,`authorize`,`num_repos`,`num_members`) VALUES (?, ?, ?, ?, ?, ?, ?) []interface {}{2, "testapi", "testapi", "string", 2, 0, 0}
2018/10/25 22:33:47 [I] [SQL] UPDATE `user` SET num_teams=num_teams+1 WHERE id = ? []interface {}{2}
2018/10/25 22:33:47 [I] [SQL] COMMIT
[x]
):Description
When we migrated to Gitea from a bunch of Git repos behind an Apache, we wrote some scripts to move all repos and create users and teams and so on. This worked fairly well, except those users don't have access to the repos (404).
When I debugged this locally, I discovered that no
team_units
are created when creating a repo using the api, which is why the users won't have access to the repo, whereas when doing this with the web ui, all units are created accordingly.More specifically:
API:
UI:
Steps to reproduce
Possible solutions
(relevant code is in models/org_team.go:285
The text was updated successfully, but these errors were encountered: