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

Write / Read Permissions for specific units are ignored #2687

Closed
2 of 7 tasks
TheRealPowerCoder opened this issue Oct 11, 2017 · 6 comments
Closed
2 of 7 tasks

Write / Read Permissions for specific units are ignored #2687

TheRealPowerCoder opened this issue Oct 11, 2017 · 6 comments
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@TheRealPowerCoder
Copy link

TheRealPowerCoder commented Oct 11, 2017

Description

When using organisations and teams there are permission settings for these teams. Available options are

  • Read Permissions (with units that can be selected below)
  • Write Permissions (with units that can be selected below)
  • Admin Permissions

I created a team called WikiAuthors and only enabled them write access to the wiki. When testing the WikiAuthors could still change files in the code segment, accept pullrequest, etc (see try.gitea above).

When setting WikiAuthors to Read Permission and only for the unit Wiki, they could still see everything else but furtunetly not edit anything (except creating issues and pull requests) (see try.gitea above).

A simmilar problem arises when enableing branch protection. Users of a Team that is not whitelisted can still force push into a protected branch (this was not tested in the try.gitea version).

Am I using the permission system wrong or is it not fully implemented yet?
It seems that Gitea only cares about whether or not at least one write/read permission is set.
This Issue is somewhat related to #2684 as a broader issue concerning the permission system.

Screenshots

@TheRealPowerCoder TheRealPowerCoder changed the title Write Permissions for specific units are ignored Write / Read Permissions for specific units are ignored Oct 11, 2017
@Morlinest
Copy link
Member

I think everyone can see everything because your org and repo is public. Try to make repository private first.

@TheRealPowerCoder
Copy link
Author

I have tried your suggestion that setting the repo to private might change things. Yes it does work for read permissions. It makes sense that everybody can see everything if the repo is public.

However write permissions on the other hand are still problematic. Unless the repo is set to private, the unit settings will be ignored and everyone with at least one write permission has repo wide write access. Our repo has to be public but with units affecting write permissions, as I dont want everybody to have access for writing in the Wiki or creating releases.

As it stands now my original issue still exists: Unit Write Permissions dont affect access level unless repo is made private. If the repo is private I am unable to say that WikiAuthors have write access to the wiki and still are able to__read__ otherparts of the repo.

Seperate read and write unit permissions with at least write permissions still being affective in public repos could solve the issue.

@lunny
Copy link
Member

lunny commented Oct 15, 2017

I think the problem is we want some team could

read code and write wiki

or something like this.
Now we only support Read or Write all team's Units.
This should be an enhancement of team settings.

@lunny lunny added the type/enhancement An improvement of existing functionality label Oct 15, 2017
@lunny lunny added this to the 1.x.x milestone Oct 15, 2017
@terrywh
Copy link

terrywh commented Nov 28, 2018

are there any news on this ? is this related to #5308 / #5307 ?

@lunny
Copy link
Member

lunny commented Nov 28, 2018

This should be fixed by #5314

@lunny lunny modified the milestones: 1.x.x, 1.7.0 Nov 28, 2018
@lunny
Copy link
Member

lunny commented Nov 28, 2018

Please feel free to reopen.

@lunny lunny closed this as completed Nov 28, 2018
@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
type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants