mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 05:39:21 +02:00
* 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:
1 parent
e6cd4f3276
commit
81adf6ad86
88 files changed
+2873
-22
No files matched your search
+5
-1
@@ -531,7 +531,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(4, "IsOrganizationMember: %v", err)
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user