hide account.id in ocs api, use username
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
1 parent
17198620ac
commit
145671512a
2 files changed
+4
-3
No files matched your search
@@ -7,3 +7,4 @@ service. The userid in OCS requests is in fact the username, not our internal ac
|
|||||||
as our internal account id though, because the account id is part of various `path` formats.
|
as our internal account id though, because the account id is part of various `path` formats.
|
||||||
|
|
||||||
https://github.com/owncloud/ocis/pull/709
|
https://github.com/owncloud/ocis/pull/709
|
||||||
|
https://github.com/owncloud/ocis/pull/816
|
||||||
@@ -56,7 +56,7 @@ func (o Ocs) GetSelf(w http.ResponseWriter, r *http.Request) {
|
|||||||
o.logger.Debug().Interface("account", account).Msg("got user")
|
o.logger.Debug().Interface("account", account).Msg("got user")
|
||||||
|
|
||||||
d := &data.User{
|
d := &data.User{
|
||||||
UserID: account.Id,
|
UserID: account.OnPremisesSamAccountName,
|
||||||
DisplayName: account.DisplayName,
|
DisplayName: account.DisplayName,
|
||||||
LegacyDisplayName: account.DisplayName,
|
LegacyDisplayName: account.DisplayName,
|
||||||
Email: account.Mail,
|
Email: account.Mail,
|
||||||
@@ -104,7 +104,7 @@ func (o Ocs) GetUser(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
d := &data.User{
|
d := &data.User{
|
||||||
UserID: account.Id,
|
UserID: account.OnPremisesSamAccountName,
|
||||||
DisplayName: account.DisplayName,
|
DisplayName: account.DisplayName,
|
||||||
LegacyDisplayName: account.DisplayName,
|
LegacyDisplayName: account.DisplayName,
|
||||||
Email: account.Mail,
|
Email: account.Mail,
|
||||||
@@ -218,7 +218,7 @@ func (o Ocs) AddUser(w http.ResponseWriter, r *http.Request) {
|
|||||||
enabled = "false"
|
enabled = "false"
|
||||||
}
|
}
|
||||||
render.Render(w, r, response.DataRender(&data.User{
|
render.Render(w, r, response.DataRender(&data.User{
|
||||||
UserID: account.Id,
|
UserID: account.OnPremisesSamAccountName,
|
||||||
DisplayName: account.DisplayName,
|
DisplayName: account.DisplayName,
|
||||||
LegacyDisplayName: account.DisplayName,
|
LegacyDisplayName: account.DisplayName,
|
||||||
Email: account.Mail,
|
Email: account.Mail,
|
||||||
|
|||||||
Reference in new issue
Block a user