Gitea version (or commit ref): 1.5.0 - Git version: 2.18.0-windows.1 - Operating system: Windows 7 Professional - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [x] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes - [ ] No - [ ] Not relevant - Log gist: ## Description **Issue**: Users in Team with Administrator permissions get 404 when accessing private repository. Steps to reproduce: 0. _User1_ creates: Organization, Private Repository inside it, Team with Administrative permissions to that Repository. 1. _User1_ adds _User2_ to the Team created before. 2. _User2_ opens link to the Repository and gets 404. Bug is reproducible only with Teams that have Administrator permissions. Teams with Read or Write permissions work fine.