sightline.simon.trust — Trust API

class sightline.simon.trust.Trust[source]

Attributes

  • Trust.id: str
  • Trust.name: str
  • Trust.description: str
  • Trust.tags: List[str]
  • Trust.created: datetime
  • Trust.capabilities: List[Capability]

Class Methods

  • Trust.list()[source]

    Returns all Trusts.

    Classmethod

    Return type

    List[Trust]

  • Trust.from_id(id)[source]

    Looks up a Trust from its id.

    Classmethod

    Parameters

    id (str) –

    Return type

    Trust

  • Trust.create(name, *capabilities[, description=''][, tags=None][, discoverable=False])[source]

    Creates a new Trust. Trusts grant Capabilities on Trust contents to Trust members. Trustees are allowed to add contents and members to a Trust, and must have the Capabilities on the content they are adding to be able to delegate that Capability to members.

    A discoverable Trust is a flag that allows users who are not members to see that the Trust exists.

    Classmethod

    Parameters
    • name (Optional[str]) – The name of the Trust

    • description (str) – A description of the Trust

    • tags (Optional[List[str]]) – Tags for the Trust

    • capabilities (Capability) – The Capabilities that should be delegated from all contents to all members.

    • discoverable (bool) – Whether or not to make this Trust Discoverable to all users.

    Return type

    Trust

  • Trust.remove(id)[source]

    Removes the Trust with the given id. This will revoke any Capabilities that the Trust was granting.

    Classmethod

    Parameters

    id (str) – A Trust id to remove

    Return type

    None

Methods

  • Trust.add_trustee(id)[source]

    Adds a user to the Trust as a Trustee, which allows them to modify the Trust contents, members, and metadata.

    Parameters

    id (str) – The user id to add as a Trustee

    Return type

    None

  • Trust.remove_trustee(id)[source]

    Removes a Trustee from this Trust.

    Parameters

    id (str) – The id of the user to remove as a trustee.

    Return type

    None

  • Trust.list_trustees()[source]

    Lists the Trustees of this Trust.

    Return type

    List[Trust]

  • Trust.add_member(id)[source]

    Adds a user to the Trust as a member. This will grant them any Capabilities that the Trust grants on its contents to the user.

    Parameters

    id (str) – The id of the user to add as a member.

    Return type

    None

  • Trust.remove_member(id)[source]

    Removes a member of the Trust. This will revoke any Capabilities that they have been granted by the Trust.

    Parameters

    id (str) – The id of the user to remove from the trust.

    Return type

    None

  • Trust.list_members()[source]

    Lists members of the Trust.

    Return type

    List[User]

  • Trust.add_content(id)[source]

    Adds an object to the Trust as content. This will grant members any Capabilities that the Trust grants to its members on this object. Trust contents should not be Users.

    Parameters

    id (str) – The id of the object to add as content.

    Return type

    None

  • Trust.remove_content(id)[source]

    Removes an object from the content of the Trust. This will revoke any Capabilities that members have been granted by the Trust on this object.

    Parameters

    id (str) – The id of the object to remove from trust content.

    Return type

    None

  • Trust.list_content()

    Lists objects in the Trust contents.

    Return type

    List[V1Resource]

  • Trust.update([name=None][, description=None][, tags=None])[source]

    Updates the Trust metadata with whichever fields are set.

    Parameters
    • name (Optional[str]) – Changes the name of the Trust

    • description (Optional[str]) – Changes the description of the Trust

    • tags (Optional[List[str]]) – Changes the tags of the Trust