<?php

declare(strict_types=1);

namespace apexl\Io\modules\user\enums\permissions;

use apexl\Io\modules\user\interfaces\PermissionInterface;
use apexl\Io\modules\user\traits\IsPermissionTrait;

enum User implements PermissionInterface, \JsonSerializable
{
    use IsPermissionTrait;

    case MANAGE;
    case CREATE;
    case VIEW;
    case UPDATE;
    case DELETE;

    case CHANGE_ACTIVE_STATE;
    case CAN_REGISTER;
    case UPDATE_SELF;
    case CAN_MASQUERADE;

    // Admin-assisted 2FA reset: deactivate a target user's 2FA methods +
    // recovery codes and force re-enrolment. Deliberately its own permission
    // (not blanket MANAGE) so it can be scoped tightly — the backstop for a
    // locked-out user in enforced mode. See Plan 007 §4.
    case RESET_TWO_FACTOR;
}
