IsOrganizationOwner returns true if given user is in the owner team.
(orgID, userID int64)
| 251 | |
| 252 | // IsOrganizationOwner returns true if given user is in the owner team. |
| 253 | func IsOrganizationOwner(orgID, userID int64) bool { |
| 254 | has, _ := x.Where("is_owner = ?", true).And("uid = ?", userID).And("org_id = ?", orgID).Get(new(OrgUser)) |
| 255 | return has |
| 256 | } |
| 257 | |
| 258 | // IsOrganizationMember returns true if given user is member of organization. |
| 259 | func IsOrganizationMember(orgID, uid int64) bool { |
no test coverage detected