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:
parent
b2620e80e1
commit
8c062d592a
11 changed files with 178 additions and 55 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue