Skip to main content

BasePermissionProvider

This item only works when running on the server. Server

Basic interface for providing permissions.

Functions

new

BasePermissionProvider.new(config{remoteFunctionNamestring}) → BasePermissionProvider

Initializes a new permission provider

Start

BasePermissionProvider:Start() → ()

Starts the permission provider. Should be done via ServiceBag.

PromiseIsPermissionLevel

BasePermissionProvider:PromiseIsPermissionLevel(
playerPlayer,
permissionLevelPermissionLevel
) → Promise<boolean>

Returns whether the player is a creator.

IsPermissionLevel

BasePermissionProvider:IsPermissionLevel(
playerPlayer,
permissionLevelPermissionLevel
) → Promise<boolean>

Returns whether the player is a creator.

PromiseIsCreator

BasePermissionProvider:PromiseIsCreator(playerPlayer) → Promise<boolean>

Returns whether the player is a creator.

PromiseIsAdmin

BasePermissionProvider:PromiseIsAdmin(playerPlayer) → Promise<boolean>

Returns whether the player is an admin.

IsCreator

BasePermissionProvider:IsCreator(playerPlayer) → boolean

Returns whether the player is a creator.

info

May return false if not loaded. Prefer using the promise version.

IsAdmin

BasePermissionProvider:IsAdmin(playerPlayer) → boolean

Returns whether the player is an admin.

info

May return false if not loaded. Prefer using the promise version.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Initializes a new permission provider",
            "params": [
                {
                    "name": "config",
                    "desc": "",
                    "lua_type": "{ remoteFunctionName: string }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BasePermissionProvider"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
            }
        },
        {
            "name": "Start",
            "desc": "Starts the permission provider. Should be done via ServiceBag.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 37,
                "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
            }
        },
        {
            "name": "PromiseIsPermissionLevel",
            "desc": "Returns whether the player is a creator.",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "permissionLevel",
                    "desc": "",
                    "lua_type": "PermissionLevel"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<boolean>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 52,
                "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
            }
        },
        {
            "name": "IsPermissionLevel",
            "desc": "Returns whether the player is a creator.",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "permissionLevel",
                    "desc": "",
                    "lua_type": "PermissionLevel"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<boolean>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 65,
                "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
            }
        },
        {
            "name": "PromiseIsCreator",
            "desc": "Returns whether the player is a creator.",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<boolean>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 88,
                "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
            }
        },
        {
            "name": "PromiseIsAdmin",
            "desc": "Returns whether the player is an admin.",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<boolean>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 99,
                "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
            }
        },
        {
            "name": "IsCreator",
            "desc": "Returns whether the player is a creator.\n\n:::info\nMay return false if not loaded. Prefer using the promise version.\n:::",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 115,
                "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
            }
        },
        {
            "name": "IsAdmin",
            "desc": "Returns whether the player is an admin.\n\n:::info\nMay return false if not loaded. Prefer using the promise version.\n:::",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 131,
                "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "BasePermissionProvider",
    "desc": "Basic interface for providing permissions.",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 6,
        "path": "src/permissionprovider/src/Server/Providers/BasePermissionProvider.lua"
    }
}