Skip to content

Commit

Permalink
better user names in wopi apps
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Sep 27, 2022
1 parent 3fb6add commit a272109
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/better-usernames.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Use Displayname in wopi apps and fix publicshares

We now use the users display name in wopi apps and do not set the userid in publicshares.

https://github.com/cs3org/reva/pull/3282
4 changes: 3 additions & 1 deletion pkg/app/provider/wopi/wopi.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,13 @@ func (p *wopiProvider) GetAppURL(ctx context.Context, resource *provider.Resourc
if u.Opaque != nil {
if _, ok := u.Opaque.Map["public-share-role"]; ok {
isPublicShare = true
// Makes the session anonymous
q.Del("userid")
}
}

if !isPublicShare {
q.Add("username", u.Username)
q.Add("username", u.DisplayName)
}
}

Expand Down

0 comments on commit a272109

Please sign in to comment.