Use reasonable set of properties

ocis-graph will be responsible for building graph api resources like
user and groups as well as their relationships. ocis accounts deals
users and groups with all properties necessary to provision user
accounts.

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-06-15 16:04:23 +02:00
parent 368d744b7c
commit e78c4395de
3 changed files with 711 additions and 1585 deletions
-2
View File
@@ -160,7 +160,6 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest
res.Accounts = append(res.Accounts, &proto.Account{
Id: sr.Entries[i].GetAttributeValue(s.Config.LDAP.Schema.AccountID),
// TODO identities
// TODO Username is in the identities ... or in onpremisesamaccountname or in preferredname ...
Username: sr.Entries[i].GetAttributeValue(s.Config.LDAP.Schema.Username),
DisplayName: sr.Entries[i].GetAttributeValue(s.Config.LDAP.Schema.DisplayName),
Mail: sr.Entries[i].GetAttributeValue(s.Config.LDAP.Schema.Mail),
@@ -204,7 +203,6 @@ func (s Service) GetAccount(c context.Context, req *proto.GetAccountRequest, res
case 1:
res.Id = sr.Entries[0].GetAttributeValue(s.Config.LDAP.Schema.AccountID)
// TODO identities?
// TODO Username is in the identities ... or in onpremisesamaccountname or in preferredname ...
res.Username = sr.Entries[0].GetAttributeValue(s.Config.LDAP.Schema.Username)
res.DisplayName = sr.Entries[0].GetAttributeValue(s.Config.LDAP.Schema.DisplayName)
res.Mail = sr.Entries[0].GetAttributeValue(s.Config.LDAP.Schema.Mail)