diff options
Diffstat (limited to 'models/org.go')
-rw-r--r-- | models/org.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/org.go b/models/org.go index 81542f0e60..a98a1bd894 100644 --- a/models/org.go +++ b/models/org.go @@ -314,7 +314,11 @@ func IsOrganizationOwner(orgID, uid int64) (bool, error) { // IsOrganizationMember returns true if given user is member of organization. func IsOrganizationMember(orgID, uid int64) (bool, error) { - return x. + return isOrganizationMember(x, orgID, uid) +} + +func isOrganizationMember(e Engine, orgID, uid int64) (bool, error) { + return e. Where("uid=?", uid). And("org_id=?", orgID). Table("org_user"). |