Check user under org.

This commit is contained in:
Yang Luo
2021-02-14 21:21:42 +08:00
parent 7203dcbe22
commit 65eee22099
11 changed files with 64 additions and 38 deletions

View File

@ -28,16 +28,16 @@ func (user *User) getId() string {
return fmt.Sprintf("%s/%s", user.Owner, user.Name)
}
func HasMail(email string) string {
user := GetMail(email)
func HasMail(application *Application, email string) string {
user := GetMail(application.Organization, email)
if user != nil {
return user.getId()
}
return ""
}
func HasGithub(github string) string {
user := GetGithub(github)
func HasGithub(application *Application, github string) string {
user := GetGithub(application.Organization, github)
if user != nil {
return user.getId()
}