#pragma once
#include "card.h"
#include "game.h"
#include "user.h"
/// Side-effect-free application permission policy.
class AuthorizationService
{
public:
/// Return whether an actor may view a card through the WebGL page.
bool canViewCard(const User& actor, const Card& card,
bool actor_owns_card) const;
/// Return whether an actor may create a card.
bool canCreateCard(const User& actor) const;
/// Return whether an actor may edit a card.
bool canEditCard(const User& actor, const Card& card) const;
/// Return whether an actor may delete cards.
bool canDeleteCard(const User& actor) const;
/// Return whether an actor may set card rarity.
bool canSetRarity(const User& actor) const;
/// Return whether an actor may manage series and users.
bool canAdminister(const User& actor) const;
/// Return the game-content scope available to an actor.
GameContentScope gameContentScope(const User& actor) const;
/// Return whether an actor may use a game in a card mutation.
bool canUseGame(const User& actor, const Game& game) const;
};