release 1.1.0 : sync V2 (upload, download, purge, placements, rétention, groupes)
Release / release-apk (push) Successful in 9m25s
Release / release-docker (push) Successful in 33s
CI / docker (push) Successful in 7s
CI / lint-backend (push) Successful in 1m29s
CI / lint-mobile (push) Failing after 7m46s
CI / test-backend (push) Successful in 1m30s
CI / test-mobile (push) Successful in 9m27s
CI / build-backend (push) Successful in 47s
Release / release-apk (push) Successful in 9m25s
Release / release-docker (push) Successful in 33s
CI / docker (push) Successful in 7s
CI / lint-backend (push) Successful in 1m29s
CI / lint-mobile (push) Failing after 7m46s
CI / test-backend (push) Successful in 1m30s
CI / test-mobile (push) Successful in 9m27s
CI / build-backend (push) Successful in 47s
This commit is contained in:
@@ -9,8 +9,11 @@ import (
|
||||
// ShareGrantDTO serializes one active grant for GET /files/:id/shares.
|
||||
// Milliseconds epoch (null = never), mirroring the permissions snapshot
|
||||
// (docs/api-v1.md §6.2) for cheap client-side expiry checks.
|
||||
// `granteeKind` is "user" or "group" (V2-6) ; `granteeUserId` carries the
|
||||
// principal id either way, `username` its display name.
|
||||
type ShareGrantDTO struct {
|
||||
GranteeUserID string `json:"granteeUserId"`
|
||||
GranteeKind string `json:"granteeKind"`
|
||||
Username string `json:"username"`
|
||||
Access string `json:"access"`
|
||||
Inherit bool `json:"inherit"`
|
||||
@@ -51,8 +54,13 @@ func (s *Resources) ListShares(userID, resourceID string) ([]ShareGrantDTO, erro
|
||||
ms := g.ExpiresAt.UnixMilli()
|
||||
expires = &ms
|
||||
}
|
||||
granteeID := g.GranteeUserID
|
||||
if g.GranteeGroupID != "" {
|
||||
granteeID = g.GranteeGroupID
|
||||
}
|
||||
out = append(out, ShareGrantDTO{
|
||||
GranteeUserID: g.GranteeUserID,
|
||||
GranteeUserID: granteeID,
|
||||
GranteeKind: g.GrantKind(),
|
||||
Username: g.Username,
|
||||
Access: g.Access,
|
||||
Inherit: g.Inherit,
|
||||
|
||||
Reference in New Issue
Block a user