UserContext

object UserContext

Provides UserContext factory.

Companion
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def apply(userId: String, groupId: String): UserContext

Creates UserContext with supplied identity.

Creates UserContext with supplied identity.

Value Params
groupId

group identifier

userId

user identifier

Note

User and group permissions added to security context.

def apply(userId: String, groupId: String, permissions: Set[Permission]): UserContext

Creates UserContext with supplied identity and permissions.

Creates UserContext with supplied identity and permissions.

Value Params
groupId

group identifier

permissions

permissions

userId

user identifier

Note

User and group permissions are added to set of supplied permissions.

def apply(userId: String, groupId: String, one: Permission, more: Permission*): UserContext

Creates UserContext with supplied identity and permissions.

Creates UserContext with supplied identity and permissions.

Value Params
groupId

group identifier

more

additional permissions

one

permission

userId

user identifier

Note

User and group permissions are added to set of supplied permissions.

def unapply(security: UserContext): Option[(String, String, Set[Permission])]

Destructures user context to its userId, groupId, and permissions.

Destructures user context to its userId, groupId, and permissions.

Value Params
security

user context