mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Fix org visibility bug when git cloning (#6743)
* fix org visibility bug * fix permission check * add integration tests * fix tests * change test user name for easier maintainance and fix test * fix test git repo name
This commit is contained in:
parent
e8f4c7733a
commit
199faadea3
87 changed files with 2865 additions and 14 deletions
|
@ -538,7 +538,11 @@ func (u *User) IsUserOrgOwner(orgID int64) bool {
|
|||
|
||||
// IsUserPartOfOrg returns true if user with userID is part of the u organisation.
|
||||
func (u *User) IsUserPartOfOrg(userID int64) bool {
|
||||
isMember, err := IsOrganizationMember(u.ID, userID)
|
||||
return u.isUserPartOfOrg(x, userID)
|
||||
}
|
||||
|
||||
func (u *User) isUserPartOfOrg(e Engine, userID int64) bool {
|
||||
isMember, err := isOrganizationMember(e, u.ID, userID)
|
||||
if err != nil {
|
||||
log.Error("IsOrganizationMember: %v", err)
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue