Commit 36f9a2d3 authored by jan.koester's avatar jan.koester
Browse files

docker preps

parent c27c02b8
Loading
Loading
Loading
Loading
Loading
+10 −5
Changes for src/admin.cpp: 10 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ namespace authdb {
    class AdminController {
    public:
        AdminController(authdb::AuthBackend &backend,netplus::socket *ssock) : _AdminBackend(backend){
            _Indexpage.loadFile(_IndexElement,"../data/index.html");
            _Loginpage.loadFile(_LoginElement,"../data/login.html");
            _Indexpage.loadFile(_IndexElement,GETDATA(index.html));
            _Loginpage.loadFile(_LoginElement,GETDATA(login.html));
        };

        void listUsers(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args,const char *url){
@@ -1740,11 +1740,16 @@ namespace authdb {
                        try{
                            gpoli << gdat.getDesc();
                        }catch(...){}
                        gpoli << "</td>"
                              << "<td>" << gdat.getGpoValue() <<"</td>"
                              << "<td>"
                        gpoli << "</td>";
                        if(gdat.getGpoValue())
                            gpoli << "<td>Allowed</td>";
                        else
                            gpoli << "<td>Permitted</td>";
                        gpoli << "<td>"
                              << "<a class=\"button\" href=\"" << "/settings/"
                              << cdid <<"/removegpo/" << cruid <<"\">Delete</a>"
                              << "<a class=\"button\" href=\"" << "/settings/"
                              << cdid <<"/editgpo/" << cruid <<"\">Edit</a>"
                              << "</td>"
                              << "</tr>";
                        domel.appendChild(gpoli.parse());
+2 −2
Changes for src/authdb.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -58,13 +58,13 @@ namespace authdb {
            HttpEvent(ssock),
            _AdminBackend(backend),
            _AdminInterface(backend,ssock){
            std::ifstream authfs("../data/authdb.js", std::ios::ate);
            std::ifstream authfs(GETDATA(authdb.js), std::ios::ate);
            size_t asize = authfs.tellg();
            _AuthJs.resize(asize);
            authfs.seekg(0);
            authfs.read(_AuthJs.data(),asize);

            std::ifstream cssfs("../data/style.css", std::ios::ate);
            std::ifstream cssfs(GETDATA(style.css), std::ios::ate);
            size_t csssize = cssfs.tellg();
            _AuthCss.resize(csssize);
            cssfs.seekg(0);
+7 −0
Changes for src/authdb.h: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -31,6 +31,13 @@

#pragma once


#ifndef DATAPATH
#define DATAPATH "../data"
#endif

#define GETDATA(file) ( DATAPATH "/" #file )

#define VERSION 1

namespace authdb {