Role.all()

Get the set of all roles.

Signature

Role.all(): Set<Role>

Description

This method returns the set of all roles in the database. If Role.all() is the last expression in a query, the first page of the Set<Role> is returned.

Parameters

None

Return value

Type Description

Set<Role>

A set of Role objects for each role in the current database.

Examples

Role.all()
{
  data: [
    {
      name: "humanResources",
      coll: Role,
      ts: Time("2023-07-21T00:22:25.260Z"),
      privileges: {
        resource: "People",
        actions: {
          read: true,
          create: "data => data.status == \'active\' "
        }
      }
    }
  ]
}

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!