package me.eater.hefbrug.platform_utils.user import me.eater.hefbrug.executor.ExecutionContext import me.eater.hefbrug.platform_utils.PlatformUtil abstract class UserManager(val context: ExecutionContext) { protected val ro = context.roAccess protected val rw = context.rwAccess companion object { private val managers: Set> = setOf( UsermodManager.Util ) suspend fun getManager(context: ExecutionContext): UserManager { return managers.find { it.isSupported(context.roAccess) }?.getManager(context) ?: error("Can't find appropriate User Manager for your system") } } }