1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0 2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors 30ec8b83dSEd Tanous #pragma once 40ec8b83dSEd Tanous #include <nlohmann/json.hpp> 50ec8b83dSEd Tanous 60ec8b83dSEd Tanous namespace privileges 70ec8b83dSEd Tanous { 80ec8b83dSEd Tanous // clang-format off 90ec8b83dSEd Tanous 100ec8b83dSEd Tanous enum class PrivilegeType{ 110ec8b83dSEd Tanous Invalid, 120ec8b83dSEd Tanous Login, 130ec8b83dSEd Tanous ConfigureManager, 140ec8b83dSEd Tanous ConfigureUsers, 150ec8b83dSEd Tanous ConfigureSelf, 160ec8b83dSEd Tanous ConfigureComponents, 170ec8b83dSEd Tanous NoAuth, 180ec8b83dSEd Tanous ConfigureCompositionInfrastructure, 190ec8b83dSEd Tanous AdministrateSystems, 200ec8b83dSEd Tanous OperateSystems, 210ec8b83dSEd Tanous AdministrateStorage, 220ec8b83dSEd Tanous OperateStorageBackup, 230ec8b83dSEd Tanous }; 240ec8b83dSEd Tanous 250ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(PrivilegeType, { 260ec8b83dSEd Tanous {PrivilegeType::Invalid, "Invalid"}, 270ec8b83dSEd Tanous {PrivilegeType::Login, "Login"}, 280ec8b83dSEd Tanous {PrivilegeType::ConfigureManager, "ConfigureManager"}, 290ec8b83dSEd Tanous {PrivilegeType::ConfigureUsers, "ConfigureUsers"}, 300ec8b83dSEd Tanous {PrivilegeType::ConfigureSelf, "ConfigureSelf"}, 310ec8b83dSEd Tanous {PrivilegeType::ConfigureComponents, "ConfigureComponents"}, 320ec8b83dSEd Tanous {PrivilegeType::NoAuth, "NoAuth"}, 330ec8b83dSEd Tanous {PrivilegeType::ConfigureCompositionInfrastructure, "ConfigureCompositionInfrastructure"}, 340ec8b83dSEd Tanous {PrivilegeType::AdministrateSystems, "AdministrateSystems"}, 350ec8b83dSEd Tanous {PrivilegeType::OperateSystems, "OperateSystems"}, 360ec8b83dSEd Tanous {PrivilegeType::AdministrateStorage, "AdministrateStorage"}, 370ec8b83dSEd Tanous {PrivilegeType::OperateStorageBackup, "OperateStorageBackup"}, 380ec8b83dSEd Tanous }); 390ec8b83dSEd Tanous 400ec8b83dSEd Tanous } 410ec8b83dSEd Tanous // clang-format on 42