() => (ctx: RequestContext, options?: ListQueryOptions<Role>, relations?: RelationPaths<Role>) => Promise<PaginatedList<Role>>(ctx: RequestContext, roleId: ID, relations?: RelationPaths<Role>) => Promise<Role | undefined>Returns true if the active user holds every Permission granted by the given Roles, on every
Channel to which those Roles are assigned. This is the one rule which decides whether the active
user may read a Role, grant it to an Administrator, or see an Administrator who holds it.
The Roles are always read from the database, never from the Role cache. The answer authorises writes, and a Role missing from a stale cache would be treated as granting nothing, which is the wrong direction to fail in.
(ctx: RequestContext, roleId: ID) => Promise<Channel[]>(ctx?: RequestContext) => Promise<Role>Returns the special SuperAdmin Role, which always exists in Vendure.
(ctx?: RequestContext) => Promise<Role>Returns the special Customer Role, which always exists in Vendure.
() => string[]Returns all the valid Permission values
(ctx: RequestContext, channelId: ID, permission: Permission) => Promise<boolean>Returns true if the User has the specified permission on that Channel
(ctx: RequestContext, channelId: ID, permissions: Permission[]) => Promise<boolean>Returns true if the User has any of the specified permissions on that Channel
(ctx: RequestContext, channelId: ID, permissions: Permission[]) => Promise<boolean>Returns true if the User has all the specified permissions on that Channel
(ctx: RequestContext, input: CreateRoleInput) => Promise<Role>(ctx: RequestContext, input: UpdateRoleInput) => Promise<Role>(ctx: RequestContext, id: ID) => Promise<DeletionResponse>(ctx: RequestContext, roleId: ID, channelId: ID) => Architecture reviews, custom plugin work, migrations, ongoing support. Get a hand from the team that builds Vendure.
Talk to the team