Role.all()
Learn: Roles |
---|
Get the set of all roles.
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.
Examples
Role.all()
{
data: [
{
name: "manager",
coll: Role,
ts: Time("2099-07-21T00:22:25.260Z"),
privileges: [
{
resource: "Store",
actions: {
create: true,
read: true,
write: true,
delete: true
}
},
...
{
resource: "Manager",
actions: {
read: "(ref) => Query.identity() == ref"
}
}
],
membership: [
{
resource: "Manager"
}
]
},
...
]
}
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!