#include "get_user_access_group_config.h"
#include <saas/deploy_manager/server/client/client.h>

namespace NRTYDeploy {
    bool TScriptGetUserAccessGroupConfig::Process(IDeployInfoRequest& request) {
        TString user = request.GetRD().CgiParam.Get("group");
        TString result = request.GetUserAccessControl().GetUserConfig(user, true);
        request.Output() << "HTTP/1.1 200 Ok\r\n\r\n";
        request.Output() << result;
        return true;
    }
    TScriptGetUserAccessGroupConfig::TFactory::TRegistrator<TScriptGetUserAccessGroupConfig> TScriptGetUserAccessGroupConfig::Registrator("get_user_access_group_config");
}
