1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 06:09:42 +02:00

sync Keycloak users with Documize

This commit is contained in:
Harvey Kandola 2017-03-19 14:25:21 +00:00
parent b2620e80e1
commit 8c062d592a
11 changed files with 178 additions and 55 deletions

View file

@ -64,6 +64,17 @@ func (user *User) Fullname() string {
return fmt.Sprintf("%s %s", user.Firstname, user.Lastname)
}
// GetAccount returns matching org account using orgID
func (user *User) GetAccount(orgID string) (a Account, found bool) {
for _, a := range user.Accounts {
if a.OrgID == orgID {
return a, true
}
}
return a, false
}
// Organization defines a company that uses this app.
type Organization struct {
BaseEntity