AccessManager

An AccessManager is used retrieve, check, and store user access levels and permissions, and game and emulator filters. This interface defines the static access levels and methods that an AccessManager must implement. How the access permissions are stored, checked, and manipulated is left to the implementation class.

Most of the main EmuLinker components are passed a handle to the current AccessManager and make calls to it upon user interactions.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun addPermaBan(addressPattern: String, issuer: String? = null, reason: String? = null)
Link copied to clipboard
abstract fun addPermaMute(addressPattern: String, issuer: String? = null, reason: String? = null)
Link copied to clipboard
abstract fun addSilenced(addressPattern: String, duration: Duration, issuer: String? = null, reason: String? = null)

Temporarily adds a user to the silenced list using a pattern algorithm defined by the AccessManager implementation. While active, isSilenced should return true * .

Link copied to clipboard
abstract fun addTempAdmin(addressPattern: String, duration: Duration)

Temporarily adds a user to the admin list using a pattern algorithm defined by the AccessManager implementation. While active, getAccess should return ACCESS_ADMIN.

Link copied to clipboard
abstract fun addTempBan(addressPattern: String, duration: Duration, issuer: String? = null, reason: String? = null)

Temporarily adds a user to the banned list using a pattern algorithm defined by the AccessManager implementation. While active, isAddressAllowed should return false, and getAccess should return ACCESS_BANNED.

Link copied to clipboard
abstract fun addTempElevated(addressPattern: String, duration: Duration)
Link copied to clipboard
abstract fun addTempModerator(addressPattern: String, duration: Duration)
Link copied to clipboard
abstract fun clearTemp(address: InetAddress, clearAll: Boolean): Boolean
Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract fun getAccess(address: InetAddress): Int

Returns the client's assigned access level

Link copied to clipboard
abstract fun getAnnouncement(address: InetAddress): String?

Returns a login announcement string

Link copied to clipboard
abstract fun getSilence(address: InetAddress): Silence?
Link copied to clipboard
abstract fun getTempBan(address: InetAddress): TempBan?
Link copied to clipboard
abstract fun isAddressAllowed(address: InetAddress): Boolean

Checks if address is allowed to connect.

Link copied to clipboard
abstract fun isEmulatorAllowed(emulator: String): Boolean

Checks if client's emulator is allowed (not filtered)

Link copied to clipboard
abstract fun isGameAllowed(game: String): Boolean

Checks if client's game (ROM) is allowed (not filtered)

Link copied to clipboard
abstract fun isSilenced(address: InetAddress): Boolean

Checks if address is silenced