From 95a4d3c9de9982e24e0330c03c63542bca23b062 Mon Sep 17 00:00:00 2001 From: "Hugo G. Labrador" Date: Wed, 18 Mar 2020 12:16:06 +0100 Subject: [PATCH] reva: fix cli commands (#569) --- CONTRIBUTORS.md | 1 + cmd/reva/ls.go | 2 +- cmd/reva/share-list-received.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5c36b38193..ad4dfc367c 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,6 +6,7 @@ - Hannah von Reth - Hugo Gonzalez Labrador - Ilja Neumann +- Ishank Arora - Jörn Friedrich Dreyer - LovisaLugnegard - Michael D'Silva diff --git a/cmd/reva/ls.go b/cmd/reva/ls.go index 4919199241..6672a2a0cc 100644 --- a/cmd/reva/ls.go +++ b/cmd/reva/ls.go @@ -69,7 +69,7 @@ func lsCommand() *command { } if *longFlag { - fmt.Printf("%+v %d %d %v %s\n", info.PermissionSet, info.Mtime, info.Size, info.Id, p) + fmt.Printf("%s %d %d %v %s\n", info.Type, info.Mtime, info.Size, info.Id, p) } else { fmt.Println(p) } diff --git a/cmd/reva/share-list-received.go b/cmd/reva/share-list-received.go index 4e898b23bb..47b747fafc 100644 --- a/cmd/reva/share-list-received.go +++ b/cmd/reva/share-list-received.go @@ -54,7 +54,7 @@ func shareListReceivedCommand() *command { t.AppendHeader(table.Row{"#", "Owner.Idp", "Owner.OpaqueId", "ResourceId", "Permissions", "Type", "Grantee.Idp", "Grantee.OpaqueId", "Created", "Updated", "State"}) for _, s := range shareRes.Shares { t.AppendRows([]table.Row{ - {s.Share.Id.OpaqueId, s.Share.Owner.OpaqueId, s.Share.Owner.Idp, s.Share.Owner.OpaqueId, s.Share.ResourceId.String(), s.Share.Permissions.String(), s.Share.Grantee.Type.String(), s.Share.Grantee.Id.Idp, s.Share.Grantee.Id.OpaqueId, time.Unix(int64(s.Share.Ctime.Seconds), 0), time.Unix(int64(s.Share.Mtime.Seconds), 0), s.State.String()}, + {s.Share.Id.OpaqueId, s.Share.Owner.Idp, s.Share.Owner.OpaqueId, s.Share.ResourceId.String(), s.Share.Permissions.String(), s.Share.Grantee.Type.String(), s.Share.Grantee.Id.Idp, s.Share.Grantee.Id.OpaqueId, time.Unix(int64(s.Share.Ctime.Seconds), 0), time.Unix(int64(s.Share.Mtime.Seconds), 0), s.State.String()}, }) } t.Render()