Skip to content

Support list_users in the Store File #304

Description

@rhamzeh

Add support for list_users in the store file

For the store file, we have a choice to make in how we represent the expected output. It can be:

1- Go for consistency with other fields:

    -  list_users:
        - object: document:1
          user_filter:
            - type: user
            - type: team
              relation: member
          context: {}
          assertions:
            can_view:
              users:
                - user:ewan
                - team:fga#member
                - employee:*
              excluded_users:
                - user:ewan
                - team:fga#member

2- Stick with API Design

    -  list_users:
        - object: document:1
          user_filter:
            - type: user
            - type: team
              relation: member
          context: {}
          assertions:
            can_view:
              users:
                  - object:
                      type: user
                      id: ewan
                  - userset:
                      type: team
                      id: fga
                      relation: member
                  - wildcard:
                      type: employee
                      wildcard: {}
                excluded_users:
                  - object:
                      type: user
                      id: ewan
                  - userset:
                      type: team
                      id: fga
                      relation: member

3- A simplified form of the API design

    -  list_users:
        - object: document:1
          user_filter:
            - type: user
            - type: team
              relation: member
          context: {}
          assertions:
            can_view:
              users:
                - type: user
                  id: ewan
                - type: team
                  id: fga
                  relation: member
                - type: employee
                  wildcard: {}
              excluded_users:
                - type: user
                  id: ewan
                - type: team
                  id: fga
                  relation: member

We're going to go with option (1)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions