Skip to content

Permissions

Kith M edited this page Apr 16, 2018 · 13 revisions

Permissions

Table of Contents

  1. Permissions
    1. User Type
    2. Settings
    3. Permission Management
    4. Group
    5. Notifications
  2. Formatting Permissions
    1. Adding Permissions

User Type

Permission Description
user.type.permanent Permanent users cannot be deleted, regardless of having settings.manage.self
user.type.hidden Hidden users are not displayed in the user database unless the viewing user has settings.see.hidden

Settings

Permission Description
settings.see.hidden Allows the user to see all users, regardless of having user.type.hidden
settings.manage.self Allows the user to change their own username, password, and delete their account
settings.manage.others Planned for future implementation

Permission Management

Permission Description
permissions.add.self Allows the user to add permissions to their own account
permissions.add.others Allows the user to add permissions to the selected user's account
permissions.remove.self Allows the user to remove permissions from their own account
permissions.remove.others Allows the user to remove permissions from the selected user's account

Group

Permission Description
group.promote Allows the user to promote another user to Admin
group.demote Allows the user to demote another user to User

Notifications

Permission Description
notifications.off Hide all notifications for the current user, excluding warning prompts

Formatting Permissions

In most cases, permissions can be tricky to deal with. To properly format your permissions within the data.ruth file, make sure the file is opened with a XML compatible text program, such as NotePad++, as it will make editing the file much more fluent and easier to understand.

When you first start the game, or your data.ruth file is absent, a new one will be created. Opening the file will reveal formatted text in tags, which appear as: <tag> (opening) and </tag> (closing). Their contents appear within the tags such as in either of the following ways:

<tag>text</tag>
<tag>
text
</tag>

The default data.ruth file contains two users, the first which has the username of default and password of password and second with the username of admin and password of password. The file will be laid out as follows:

<?xml version="1.0" encoding="utf-16"?>
<Game update="0.1.409">
  <User>
    <Username>default</Username>
    <Password>password</Password>
    <Bio>This user does not have a bio.</Bio>
    <UserGroup>User</UserGroup>
    <Permissions />
  </User>
  <User>
    <Username>admin</Username>
    <Password>password</Password>
    <Bio>This user does not have a bio.</Bio>
    <UserGroup>Admin</UserGroup>
    <Permissions>
      <Permission>permissions.add.self</Permission>
      <Permission>permissions.remove.self</Permission>
      <Permission>permissions.add.others</Permission>
      <Permission>permissions.remove.others</Permission>
    </Permissions>
  </User>
</Game>

Notice how since the permissions are empty, the game saves the permissions as a self-closing tag, or as an empty tag with no content.

There are multiple ways to add permissions to a user.

  1. You may add permissions within the game (this required the user to already have the permissions permissions.add.self
  2. You may add permissions outside of the game (directly editing the data.ruth file)
  3. You may both add permissions outside of the game and within the game in any order

Adding Permissions within the XML file

Permissions are read similarly to the way the username, password, bio, and usergroup are laid out. Change the permissions tag to a starting tag and add an ending tag. For each permission you want to add, create a new starting and end tag Permission. Then, you may add as many permissions as you wish. After that, the file should look like this:

<?xml version="1.0" encoding="utf-16"?>
<Game update="0.1.409">
  <User>
    <Username>default</Username>
    <Password>password</Password>
    <Bio>This user does not have a bio.</Bio>
    <UserGroup>User</UserGroup>
    <Permissions>
        <Permission>settings.manage.self</Permission>
        <Permission>permissions.add.self</Permission>
    </Permissions>
  </User>
</Game>