-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Ensure that restricted users can access repos for which they are members (#17460) #17464
Conversation
…ers (go-gitea#17460) Backport go-gitea#17460 There is a small bug in the way that repo access is checked in repoAssignment: Accessibility is checked by checking if the user has a marked access to the repository instead of checking if the user has any team granted access. This PR changes this permissions check to use HasAccess() which does the correct test. There is also a fix in the release api ListReleases where it should return draft releases if the user is a member of a team with write access to the releases. The PR also adds a testcase. Signed-off-by: Andrew Thornton <art27@cantab.net>
Do we have some documents do describe our permission system? I have questions about the real meaning about "prohibited", "active", "restricted" and how they work and how they affect the permission checks. |
I don't think we do and I agree we really do need some clarity. In general I think we need to be clearer with our permissions checks and it is holding up setting up scopes for oauth2 tokens. |
Frontport go-gitea#17457 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28 * BUGFIXES * Prevent panic in serv.go with Deploy Keys (go-gitea#17434) (go-gitea#17435) * Fix CSV render error (go-gitea#17406) (go-gitea#17431) * Read expected buffer size (go-gitea#17409) (go-gitea#17430) * Ensure that restricted users can access repos for which they are members (go-gitea#17460) (go-gitea#17464) * Make commit-statuses popup show correctly (go-gitea#17447) (go-gitea#17466) * TESTING * Add integration tests for private.NoServCommand and private.ServCommand (go-gitea#17456) (go-gitea#17463)
Frontport #17457 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28 * BUGFIXES * Prevent panic in serv.go with Deploy Keys (#17434) (#17435) * Fix CSV render error (#17406) (#17431) * Read expected buffer size (#17409) (#17430) * Ensure that restricted users can access repos for which they are members (#17460) (#17464) * Make commit-statuses popup show correctly (#17447) (#17466) * TESTING * Add integration tests for private.NoServCommand and private.ServCommand (#17456) (#17463)
Frontport go-gitea#17457 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28 * BUGFIXES * Prevent panic in serv.go with Deploy Keys (go-gitea#17434) (go-gitea#17435) * Fix CSV render error (go-gitea#17406) (go-gitea#17431) * Read expected buffer size (go-gitea#17409) (go-gitea#17430) * Ensure that restricted users can access repos for which they are members (go-gitea#17460) (go-gitea#17464) * Make commit-statuses popup show correctly (go-gitea#17447) (go-gitea#17466) * TESTING * Add integration tests for private.NoServCommand and private.ServCommand (go-gitea#17456) (go-gitea#17463)
Backport #17460
There is a small bug in the way that repo access is checked in
repoAssignment: Accessibility is checked by checking if the user has a
marked access to the repository instead of checking if the user has any
team granted access.
This PR changes this permissions check to use HasAccess() which does the
correct test. There is also a fix in the release api ListReleases where
it should return draft releases if the user is a member of a team with
write access to the releases.
The PR also adds a testcase.
Fix #17003
Fix #17041
Signed-off-by: Andrew Thornton art27@cantab.net