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

Skip AllowedUserVisibilityModes validation on update user if it is an organisation #16988

Conversation

6543
Copy link
Member

@6543 6543 commented Sep 8, 2021

if AllowedUserVisibilityModes allow only public & limited, and orgs can be private, a user can create a repo to that organisation whitch will result in an update of the user. On this call the user is validaten and will be rejected since private is not allowed, but its not an user its an valid org ...


close https://codeberg.org/Codeberg/Community/issues/516

@6543 6543 added issue/regression Issue needs no code to be fixed, only a description on how to fix it yourself backport/v1.15 labels Sep 8, 2021
@6543 6543 added this to the 1.16.0 milestone Sep 8, 2021
@6543 6543 force-pushed the fix-500-if-ALLOWED_USER_VISIBILITY_MODES-is-set-on-repo-creation-with-hidden-org-dest branch from cda9c0c to 0d6c658 Compare September 8, 2021 14:15
models/user.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 8, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 8, 2021
models/user.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 8, 2021
6543 and others added 2 commits September 8, 2021 17:19
Co-authored-by: Alexey 〒erentyev <axifnx@gmail.com>
6543 added a commit to 6543-forks/gitea that referenced this pull request Sep 8, 2021
… organisation (go-gitea#16988)

if AllowedUserVisibilityModes allow only public & limited, and orgs can be private, a user can create a repo to that organisation whitch will result in an update of the user. On this call the user is validaten and will be rejected since private is not allowed, but its not an user its an valid org ...

Co-authored-by: Alexey 〒erentyev <axifnx@gmail.com>
@6543 6543 added the backport/done All backports for this PR have been created label Sep 8, 2021
@6543
Copy link
Member Author

6543 commented Sep 8, 2021

-> #16990

@6543 6543 merged commit 8e18b41 into go-gitea:main Sep 8, 2021
@6543 6543 deleted the fix-500-if-ALLOWED_USER_VISIBILITY_MODES-is-set-on-repo-creation-with-hidden-org-dest branch September 8, 2021 15:47
lunny pushed a commit that referenced this pull request Sep 8, 2021
… organisation (#16988) (#16990)

if AllowedUserVisibilityModes allow only public & limited, and orgs can be private, a user can create a repo to that organisation whitch will result in an update of the user. On this call the user is validaten and will be rejected since private is not allowed, but its not an user its an valid org ...

Co-authored-by: Alexey 〒erentyev <axifnx@gmail.com>

Co-authored-by: Alexey 〒erentyev <axifnx@gmail.com>
zeripath added a commit to zeripath/gitea that referenced this pull request Sep 19, 2021
## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19

* ENHANCEMENTS
  * Add fluid to ui container class to remove margin (go-gitea#16396) (go-gitea#16976)
  * Add caller to cat-file batch calls (go-gitea#17082) (go-gitea#17089)
* BUGFIXES
  * Render full plain readme. (go-gitea#17083) (go-gitea#17090)
  * Upgrade xorm to v1.2.4 (go-gitea#17059)
  * Fix bug of migrate comments which only fetch one page (go-gitea#17055) (go-gitea#17058)
  * Do not show issue context popup on external issues (go-gitea#17050) (go-gitea#17054)
  * Decrement Fork Num when converting from Fork (go-gitea#17035) (go-gitea#17046)
  * Correctly rollback in ForkRepository (go-gitea#17034) (go-gitea#17045)
  * Fix missing close in WalkGitLog (go-gitea#17008) (go-gitea#17009)
  * Add prefix to SVG id/class attributes (go-gitea#16997) (go-gitea#17000)
  * Fix bug of migrated repository not index (go-gitea#16991) (go-gitea#16996)
  * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (go-gitea#16988) (go-gitea#16990)
  * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (go-gitea#16971) (go-gitea#16977)
  * Fix issue with issue default mail template (go-gitea#16956) (go-gitea#16975)
  * Ensure that rebase conflicts are handled in updates (go-gitea#16952) (go-gitea#16960)
  * Prevent panic on diff generation (go-gitea#16950) (go-gitea#16951)

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath mentioned this pull request Sep 19, 2021
lunny pushed a commit that referenced this pull request Sep 20, 2021
## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19

* ENHANCEMENTS
  * Add fluid to ui container class to remove margin (#16396) (#16976)
  * Add caller to cat-file batch calls (#17082) (#17089)
* BUGFIXES
  * Render full plain readme. (#17083) (#17090)
  * Upgrade xorm to v1.2.4 (#17059)
  * Fix bug of migrate comments which only fetch one page (#17055) (#17058)
  * Do not show issue context popup on external issues (#17050) (#17054)
  * Decrement Fork Num when converting from Fork (#17035) (#17046)
  * Correctly rollback in ForkRepository (#17034) (#17045)
  * Fix missing close in WalkGitLog (#17008) (#17009)
  * Add prefix to SVG id/class attributes (#16997) (#17000)
  * Fix bug of migrated repository not index (#16991) (#16996)
  * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (#16988) (#16990)
  * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (#16971) (#16977)
  * Fix issue with issue default mail template (#16956) (#16975)
  * Ensure that rebase conflicts are handled in updates (#16952) (#16960)
  * Prevent panic on diff generation (#16950) (#16951)

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 pushed a commit to 6543-forks/gitea that referenced this pull request Sep 21, 2021
## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19

* ENHANCEMENTS
  * Add fluid to ui container class to remove margin (go-gitea#16396) (go-gitea#16976)
  * Add caller to cat-file batch calls (go-gitea#17082) (go-gitea#17089)
* BUGFIXES
  * Render full plain readme. (go-gitea#17083) (go-gitea#17090)
  * Upgrade xorm to v1.2.4 (go-gitea#17059)
  * Fix bug of migrate comments which only fetch one page (go-gitea#17055) (go-gitea#17058)
  * Do not show issue context popup on external issues (go-gitea#17050) (go-gitea#17054)
  * Decrement Fork Num when converting from Fork (go-gitea#17035) (go-gitea#17046)
  * Correctly rollback in ForkRepository (go-gitea#17034) (go-gitea#17045)
  * Fix missing close in WalkGitLog (go-gitea#17008) (go-gitea#17009)
  * Add prefix to SVG id/class attributes (go-gitea#16997) (go-gitea#17000)
  * Fix bug of migrated repository not index (go-gitea#16991) (go-gitea#16996)
  * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (go-gitea#16988) (go-gitea#16990)
  * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (go-gitea#16971) (go-gitea#16977)
  * Fix issue with issue default mail template (go-gitea#16956) (go-gitea#16975)
  * Ensure that rebase conflicts are handled in updates (go-gitea#16952) (go-gitea#16960)
  * Prevent panic on diff generation (go-gitea#16950) (go-gitea#16951)

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
lunny pushed a commit that referenced this pull request Sep 22, 2021
## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19

* ENHANCEMENTS
  * Add fluid to ui container class to remove margin (#16396) (#16976)
  * Add caller to cat-file batch calls (#17082) (#17089)
* BUGFIXES
  * Render full plain readme. (#17083) (#17090)
  * Upgrade xorm to v1.2.4 (#17059)
  * Fix bug of migrate comments which only fetch one page (#17055) (#17058)
  * Do not show issue context popup on external issues (#17050) (#17054)
  * Decrement Fork Num when converting from Fork (#17035) (#17046)
  * Correctly rollback in ForkRepository (#17034) (#17045)
  * Fix missing close in WalkGitLog (#17008) (#17009)
  * Add prefix to SVG id/class attributes (#16997) (#17000)
  * Fix bug of migrated repository not index (#16991) (#16996)
  * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (#16988) (#16990)
  * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (#16971) (#16977)
  * Fix issue with issue default mail template (#16956) (#16975)
  * Ensure that rebase conflicts are handled in updates (#16952) (#16960)
  * Prevent panic on diff generation (#16950) (#16951)

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created issue/regression Issue needs no code to be fixed, only a description on how to fix it yourself lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants