Skip to main content

UserRole

public struct UserRole: RawRepresentable, Codable, Hashable, ExpressibleByStringLiteral 

Inheritance

Codable, ExpressibleByStringLiteral, Hashable, RawRepresentable

Initializers

init(rawValue:)

public init(rawValue: String) 

init(stringLiteral:)

public init(stringLiteral value: String) 

init(from:)

init(from decoder: Decoder) throws 

Properties

rawValue

public let rawValue: String

user

This is the default role assigned to any user.

static let user 

admin

This role allows users to perform more advanced actions. This role should be granted only to staff users

static let admin 

guest

A user that connected using guest user authentication.

static let guest 

anonymous

A user that connected using anonymous authentication.

static let anonymous 

Did you find this page helpful?