Commit 431dc74b authored by jan.koester's avatar jan.koester
Browse files

admin interface now in seperate file

parent ca0e667f
Loading
Loading
Loading
Loading
Loading
+2 −0
Changes for src/CMakeLists.txt: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
add_library(fback SHARED backends/file.cpp)

list(APPEND authdbSrcs
    admin.cpp
    authdb.cpp
    backend.cpp
    user.cpp
    domain.cpp
    group.cpp
    session.h
    hash.cpp
    hash/sha512.cpp
)

src/admin.cpp

0 → 100644
+1491 −0

File added.

Preview size limit exceeded, changes collapsed.

src/admin.h

0 → 100644
+46 −0
Changes for src/admin.h: 46 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*******************************************************************************
 * Copyright (c) 2025, Jan Koester jan.koester@gmx.net
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * Redistributions of source code must retain the above copyright
 *      notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 *      notice, this list of conditions and the following disclaimer in the
 *      documentation and/or other materials provided with the distribution.
 * Neither the name of the <organization> nor the
 *      names of its contributors may be used to endorse or promote products
 *      derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *******************************************************************************/

#include <httppp/http.h>

#include "backend.h"

#pragma once

namespace authdb {
    class AdminController;

    class AdminInterface{
    public:
        AdminInterface(AuthBackend &bck,netplus::socket *ssock);
        ~AdminInterface();
        void Request(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args);
    public:
        AdminController *_ctl;
        AuthBackend     &_bck;
    };
};
+50 −1483

File changed.

Preview size limit exceeded, changes collapsed.

+13 −0
Changes for src/authdb.h: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -82,4 +82,17 @@ namespace authdb {
    void delRecord(authdb::AuthBackend &backend,const uuid_t uid,int type);

    int searchValue(authdb::AuthBackend &backend,const char*fieldname,const char *value);

    class DomainBackend {
    public:
        DomainBackend(authdb::AuthBackend &adminbck);

        authdb::AuthBackend *data(uuid_t did);

        ~DomainBackend();

    private:
        authdb::AuthBackend &_adminbck;
        authdb::AuthBackend *_domainbck;
    };
};
Loading