Certain users should have elevated access within the game. The database should be designed to allow us to assign roles to users.
Solution
Two possible ways:
add a single "role" field to the users table and have a single linearly progressing role-model where all permissions are inherited. Or:
add a roles table which outlines the possible roles
add a player_roles table which stores the assigned roles. Account creation should set a default player role.
The possible roles should be:
playerauthor -- Allows user to create blog posts on the website. Allows user to view list of reported players to handle. Temporarily ban players for 12 hours.
moderator -- Allows user to see ended games they were not in. Allows the user to permanently ban a player's account.
admin -- Allows user to view ongoing games they are not in. Allows the user to kick players from a game. Allows player to unban accounts.
Enhancement Description
Certain users should have elevated access within the game. The database should be designed to allow us to assign roles to users.
Solution
Two possible ways:
roles
table which outlines the possible rolesplayer_roles
table which stores the assigned roles. Account creation should set a defaultplayer
role.The possible roles should be:
player
author
-- Allows user to create blog posts on the website. Allows user to view list of reported players to handle. Temporarily ban players for 12 hours.moderator
-- Allows user to see ended games they were not in. Allows the user to permanently ban a player's account.admin
-- Allows user to view ongoing games they are not in. Allows the user to kick players from a game. Allows player to unban accounts.