Skip to content
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

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

Closed
2 of 7 tasks
vosdbk opened this issue Feb 16, 2019 · 10 comments · Fixed by #6119
Closed
2 of 7 tasks

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

vosdbk opened this issue Feb 16, 2019 · 10 comments · Fixed by #6119
Assignees
Labels
Milestone

Comments

@vosdbk
Copy link

vosdbk commented Feb 16, 2019

  • 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
@lunny
Copy link
Member

lunny commented Feb 17, 2019

Cannot reproduce that on master.

@vosdbk
Copy link
Author

vosdbk commented 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
Copy link
Author

vosdbk commented 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
Copy link
Author

vosdbk commented 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
Copy link
Author

vosdbk commented 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

@lunny
Copy link
Member

lunny commented Feb 17, 2019

Your team should team units settings.

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Feb 17, 2019
@vosdbk
Copy link
Author

vosdbk commented Feb 17, 2019

Is it a bug or just due to my operations ?

@lunny
Copy link
Member

lunny commented Feb 19, 2019

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

@vosdbk
Copy link
Author

vosdbk commented 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

@lunny lunny added type/bug and removed type/question Issue needs no code to be fixed, only a description on how to fix it yourself. labels Feb 19, 2019
@lunny lunny added this to the 1.7.3 milestone Feb 19, 2019
@lunny
Copy link
Member

lunny commented 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 lunny self-assigned this Feb 19, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants