Be owner but can not access the org's project(s), show 404 #2927

Closed
opened 2025-11-02 04:54:23 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @vosdbk on GitHub (Feb 16, 2019).

Originally assigned to: @lunny on GitHub.

  • Gitea version (or commit ref): v1.7.2
  • Git version: 2.18.1
  • Operating system: ubuntu 18.04 + docker(just pull gitea/gitea)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I can not access any of the org's projects be the org's owner.
Please see the pictures below.
...

Screenshots

  1. My account and system admin be the org's owner
    My account and system admin be the org's owner
  2. This is one of the projects in the org
    This is one of the projects in the org
  3. My account can not access to the project, show me 404
    My account can not access to the project, show me 404
  4. But the other owner can access to it
    But the other owner can access to it
Originally created by @vosdbk on GitHub (Feb 16, 2019). Originally assigned to: @lunny on GitHub. <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): v1.7.2 - Git version: 2.18.1 - Operating system: ubuntu 18.04 + docker(just pull gitea/gitea) - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description I can not access any of the org's projects be the org's owner. Please see the pictures below. ... ## Screenshots 1. My account and system admin be the org's owner ![My account and system admin be the org's owner](https://user-images.githubusercontent.com/2115591/52902061-74c9ea00-3246-11e9-9630-2e88c69221e3.PNG) 2. This is one of the projects in the org ![This is one of the projects in the org](https://user-images.githubusercontent.com/2115591/52902062-7abfcb00-3246-11e9-8102-9403a761ab0c.PNG) 3. My account can not access to the project, show me 404 ![My account can not access to the project, show me 404](https://user-images.githubusercontent.com/2115591/52902063-7dbabb80-3246-11e9-8e80-faf2905eeb71.PNG) 4. But the other owner can access to it ![But the other owner can access to it](https://user-images.githubusercontent.com/2115591/52902065-7f847f00-3246-11e9-9440-ba7300a34354.PNG) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/bug label 2025-11-02 04:54:23 -06:00
Author
Owner

@lunny commented on GitHub (Feb 17, 2019):

Cannot reproduce that on master.

@lunny commented on GitHub (Feb 17, 2019): Cannot reproduce that on master.
Author
Owner

@vosdbk commented on GitHub (Feb 17, 2019):

Cannot reproduce that on master.

When i click into the repo, the log shows

2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: assets]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins]
2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: assets]
2019/02/17 12:44:48 [...routers/repo/view.go:318 Home()] [E] Home: 您没有被允许访问此仓库的任何单元。

I have already repull a new image and create a new database / container.
Then use the the backup database file, the 404 always shown.

@vosdbk commented on GitHub (Feb 17, 2019): > > > Cannot reproduce that on master. When i click into the repo, the log shows ``` 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: assets] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: plugins] 2019/02/17 12:44:23 [...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: vendor, name: assets] 2019/02/17 12:44:48 [...routers/repo/view.go:318 Home()] [E] Home: 您没有被允许访问此仓库的任何单元。 ``` I have already repull a new image and create a new database / container. Then use the the backup database file, the 404 always shown.
Author
Owner

@vosdbk commented on GitHub (Feb 17, 2019):

Cannot reproduce that on master.

I think i have found out what happend.
I change the "Owner" group's name to the custom string, then i check the database->team_unit, the lines belone to "Owner group" will be lost.
I add the org_id, team_id,type(from 1 to 7), it's working fine now

@vosdbk commented on GitHub (Feb 17, 2019): > > > Cannot reproduce that on master. I think i have found out what happend. I change the "Owner" group's name to the custom string, then i check the database->team_unit, the lines belone to "Owner group" will be lost. I add the org_id, team_id,type(from 1 to 7), it's working fine now
Author
Owner

@vosdbk commented on GitHub (Feb 17, 2019):

Cannot reproduce that on master.

I use the latest docker image, mysql 5.5, redis for cache/session, for the test.

  1. Create a org, check the team_unit table
    1
  2. Go inot the Owner's setting panel
    2
  3. Leave the input blank, just click the submit button
    3
  4. Ohhhhhh! Boom! The data has gone away
    4
@vosdbk commented on GitHub (Feb 17, 2019): > > > Cannot reproduce that on master. I use the latest docker image, mysql 5.5, redis for cache/session, for the test. 1. Create a org, check the team_unit table ![1](https://user-images.githubusercontent.com/2115591/52913725-e4e67780-32fb-11e9-9e20-b7803f8522f1.png) 2. Go inot the Owner's setting panel ![2](https://user-images.githubusercontent.com/2115591/52913711-c6807c00-32fb-11e9-82c7-a31ec576c933.png) 3. Leave the input blank, just click the submit button ![3](https://user-images.githubusercontent.com/2115591/52913712-c6807c00-32fb-11e9-930c-06d377969a86.png) 4. Ohhhhhh! Boom! The data has gone away ![4](https://user-images.githubusercontent.com/2115591/52913713-c7191280-32fb-11e9-8fbf-95c1d61b680e.png)
Author
Owner

@vosdbk commented on GitHub (Feb 17, 2019):

Cannot reproduce that on master.

I hava reproduced bug at https://try.gitea.io, with the username "vosdbk" and org/repo "cccvv / xcvvdsv", always 404

@vosdbk commented on GitHub (Feb 17, 2019): > > > Cannot reproduce that on master. I hava reproduced bug at https://try.gitea.io, with the username "vosdbk" and org/repo "cccvv / xcvvdsv", always 404
Author
Owner

@lunny commented on GitHub (Feb 17, 2019):

Your team should team units settings.

@lunny commented on GitHub (Feb 17, 2019): Your team should team units settings.
Author
Owner

@vosdbk commented on GitHub (Feb 17, 2019):

Is it a bug or just due to my operations ?

@vosdbk commented on GitHub (Feb 17, 2019): Is it a bug or just due to my operations ?
Author
Owner

@lunny commented on GitHub (Feb 19, 2019):

don't know. I cannot reproduce that. Could you reproduce that on https://try.gitea.io ?

@lunny commented on GitHub (Feb 19, 2019): don't know. I cannot reproduce that. Could you reproduce that on https://try.gitea.io ?
Author
Owner

@vosdbk commented on GitHub (Feb 19, 2019):

don't know. I cannot reproduce that. Could you reproduce that on https://try.gitea.io ?

I have reproduced it at https://try.gitea.io.
My test account is "vosdbk", ORG and repo name is "cccvv / xcvvdsv".

snipaste_2019-02-19_15-33-07

snipaste_2019-02-19_15-36-08

@vosdbk commented on GitHub (Feb 19, 2019): > > > don't know. I cannot reproduce that. Could you reproduce that on https://try.gitea.io ? I have reproduced it at https://try.gitea.io. My test account is "vosdbk", ORG and repo name is "cccvv / xcvvdsv". ![snipaste_2019-02-19_15-33-07](https://user-images.githubusercontent.com/2115591/52997701-3c9bf480-345c-11e9-9104-30126a3ea2ea.jpg) ![snipaste_2019-02-19_15-36-08](https://user-images.githubusercontent.com/2115591/52997700-3c9bf480-345c-11e9-87b2-f09c408c4ec9.jpg)
Author
Owner

@lunny commented on GitHub (Feb 19, 2019):

I can reproduce this now. After you change the owner team's settings even if you don't change anything, then all the repositories will display 404.

@lunny commented on GitHub (Feb 19, 2019): I can reproduce this now. After you change the owner team's settings even if you don't change anything, then all the repositories will display 404.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2927