This guide is designed to help you understand Oxide's permission system. It will cover the basics of what a permission is, how to give them to your players, and how to work with Oxide’s group system.
Before getting started, you will need to do the following:
- Install Oxide on your server. If you’re unsure how to do this, check out our guide on installing Oxide.
- Install a few Oxide plugins. You can find a large library of them here.
This guide will use the plugin Enhanced Ban System by austinv900 for its examples. This plugin allows you to ban users on your server list with permissions instead of assigning moderatorid/ownerid.
Permissions
Oxide allows you to add various plugins to your server which can alter gameplay through various commands or functionalities. Many of these features have associated permissions, allowing you to control who has access to each of them.
In short, permissions are simply a string or sequence of letters and digits, commonly separated into sections using periods. These sections are referred to as “permission nodes” or “nodes” for short.
Our example plugin features a few different permissions, for instance enhancedbansystem.banlist
. When a user has this permission, it allows them to use the command /banlist
Wildcards: A wildcard acts as a “grant all” for a node, and is commonly denoted by the asterisk symbol. For example, the permission enhancedbansystem.*
will grant the user all permissions from our example plugin.
Groups
Occasionally you may want to assign the same set of permissions to multiple people. For instance, you may want admins on your server to have access to commands such as banning and kicking. Instead of assigning each user the same permissions, Oxide features the group system.
Oxide’s permission groups offer the following features:
- Create multiple groups with any names.
- Quickly add and remove permissions to a group.
- Add and remove users from a group. Users inherit permissions from their groups.
- Create group hierarchies with inheritance.
Inheritance
When a user is assigned a group, they are not directly given the permissions, rather they inherit the permissions from the group. When called upon, the permission system will first check if the player has the permission, if not it will check if their groups do.
Similarly, you may assign groups a “parent” group. The “child” group will then inherit all permissions the parent has.
Below is an example of how the player Mitch inherits permissions from the Admin group, which inherits from the Mod group.
Oxide’s Permission Commands
Player Commands
Command | Description |
---|---|
Oxide.grant user <64_bit_steam_id> <permission> |
Grants a permission to an individual player. |
Oxide.revoke user <64_bit_steam_id> <permission> |
Revokes a permission from an individual player. |
Group Commands
Command | Description |
---|---|
Oxide.group add <group-name> <”[Title]”> <rank> |
Creates a new group with the specified group-name. The title and rank are optional, but if provided sets those two values.< |
Oxide.group set <group-name> <”[Title]”> <rank> |
Sets the title of the group. The rank is optional, but if provided sets the rank of the group. |
Oxide.group remove <group-name> |
Deletes the group. |
Oxide.grant group <group-name> <permission> |
Grants a permission to a group. |
Oxide.revoke group <group-name> <permission> |
Revokes a permission from a group. |
Oxide.group parent <group-name> <parent group-name> |
Set a parent for a group, the group will inherit all permissions from the parent. |
Oxide.usergroup add <64_bit_steam_id> <group-name> |
Adds a user to a group. |
Oxide.usergroup remove <64_bit_steam_id> <group-name> |
Removes a user from a group |
Information commands
Command | Description |
---|---|
Oxide.show user <64_bit_steam_id> |
Shows the permissions a user has |
Oxide.show group <group-name> |
Shows data for a specific group. Includes permissions, parents, title, rank, and members. |
Oxide.show perm <permission> |
Shows which users or groups have this permission. |
Oxide.show groups |
Shows a list of all groups. |
Oxide.show perms |
Show all registered permissions from all plugins and Oxide. |