GenericUser

mbauer83.zio_http_authorization.User$.GenericUser
case class GenericUser[I <: UserId, T <: TenantId](id: I, tenantId: Option[T], roles: Set[Role], permissions: Set[(Permission, ResourceSelector[_, _])]) extends User[I, T]

An all-purpose user-model for multi-tenant systems.

Attributes

Graph
Supertypes
trait User[I, T]
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def hasPermissionForResource(permission: String | Symbol)(resource: Resource[_]): Boolean

Returns true if and only if the user has the permission with an associated ResourceSelector that matches the given resource.

Returns true if and only if the user has the permission with an associated ResourceSelector that matches the given resource.

Attributes

Inherited from:
User
def hasRole(role: Role): Boolean

Returns true if and only if the role is associated with the user.

Returns true if and only if the role is associated with the user.

Attributes

Inherited from:
User

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product