Commit graph

8 commits

Author SHA1 Message Date
Leonard Lyubich
48837bd5da [#288] pkg/eacl: Fix conversion of slices in Table.ToV2 method
Nil slice of records of the `Table` should be converted to nil slice in
corresponding field of API v2 message structure.

Add nil-check in `Table.ToV2` implementation. The changes fix corresponding
unit test.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-28 09:37:21 +03:00
Leonard Lyubich
fc4f7429d5 [#288] pkg/eacl: Document default values set in NewTable
Document field values of instance constructed via `NewTable`. Assert the
values in corresponding unit test.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-28 09:37:21 +03:00
Leonard Lyubich
8abf78009a [#288] pkg/eacl: Convert nil eACL table to nil API v2 message
Make `Table.ToV2` method to return `nil` when called on `nil`. Write
corresponding unit test.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-28 09:37:21 +03:00
Leonard Lyubich
0719fcef59 [#283] pkg/container: Add session token and signature to Table
Extended ACL table can be set within a session, and should be signed.

Add `SessionToken` / `SetSessionToken` (`Signature` / `SetSignature`)
methods to carry session token (signature) in `Table` structure.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
f60f7e0cdb [#283] pkg/eacl: Remove usage of deprecated container ID from src files
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
c6884f9823 [#199] sdk/eacl: Correct linter's remarks
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00
Leonard Lyubich
233756ca8f [#168] acl: Implement binary/JSON encoders/decoders on Table
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Alex Vanin
edf2e2d62f [#139] sdk/acl: Add eACL structures
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00