-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Users in owner team get 404 when accessing organisation repos #4867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can see the same issue with a freshly installed Gitea version 1.5.1 The users can access other users private repositories when assigned as colaborators, but I cannot assign them as collaborators to an organization repository, when I attempt to do that I get error "The user is an organization member who cannot be added as a collaborator." The error in the log is:
|
@OndrejSpanel #4814 will resolve your problem. But your problem is different from this one. |
Are there any further information that I should provide you? Or something I could check? |
I solved the problem by myself. The table |
@nuno-silva I believe so :( |
@nuno-silva as @lafriks said. |
So I've tracked this down to commit 0b3ea42 (as part of #4034). gitea/models/migrations/migrations.go Lines 193 to 194 in 0b3ea42
I've just done a new migration (on another instance) from gitea For future reference, if you have this issue, what needs to be done is to turn each of the numbers in select id as team_id,org_id,unit_types from team where unit_types is not NULL and unit_types like '%[%]%'; into an entry in the For example: MariaDB [gitea]> select id as team_id,org_id,unit_types from team where unit_types is not NULL and unit_types like '%[%]%';
+---------+--------+-----------------+
| team_id | org_id | unit_types |
+---------+--------+-----------------+
| 1 | 3 | [1,2,3,4,5,6,7] |
+---------+--------+-----------------+
1 row in set (0.02 sec) would be MariaDB [gitea]> select * from team_unit;
+----+--------+---------+------+
| id | org_id | team_id | type |
+----+--------+---------+------+
| 1 | 3 | 1 | 1 |
| 2 | 3 | 1 | 2 |
| 3 | 3 | 1 | 3 |
| 4 | 3 | 1 | 4 |
| 5 | 3 | 1 | 5 |
| 6 | 3 | 1 | 6 |
| 7 | 3 | 1 | 7 |
+----+--------+---------+------+
7 rows in set (0.00 sec) |
[x]
):Description
Users that are in the owner team of a organisation get a 404 error if they try to access a repository of their organisaton. The gitea log shows the following messages:
The users are only in this team and organisation. All broken repos belong to the same organisation. With a administrator user it is possible to use this repos without any problems.
EDIT:
Maybe this problem is related to #2686 .
EDIT2:
content of table
repo_unit
:The text was updated successfully, but these errors were encountered: