Commit 1b3d94b6 authored by jan.koester's avatar jan.koester
Browse files

it goes on

parent 14d9fdc5
Loading
Loading
Loading
Loading
Loading
+32 −3
Changes for src/admin.cpp: 32 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -1546,6 +1546,25 @@ namespace authdb {
                        }
                };
                if(gpodat){
                    GpoData::Allow allow;
                    allow.count=0;

                    for (libhttppp::HttpForm::MultipartForm::Data* curformdat = GPOForm.MultipartFormData.getFormData();
                         curformdat; curformdat = curformdat->nextData()) {
                        for(libhttppp::HttpForm::MultipartForm::Data::ContentDisposition *curdispo=curformdat->getDisposition();
                            curdispo; curdispo=curdispo->nextContentDisposition()
                        ){
                            if( strcmp(curdispo->getKey(),"name")==0 && strcmp(curdispo->getValue(),"gpoingroup")==0 ){
                                ++allow.count;
                            }
                        }

                    }

                    allow.uid = new  uuid_t[allow.count];

                    size_t i = 0;

                    for (libhttppp::HttpForm::MultipartForm::Data* curformdat = GPOForm.MultipartFormData.getFormData();
                        curformdat; curformdat = curformdat->nextData()) {
                        for(libhttppp::HttpForm::MultipartForm::Data::ContentDisposition *curdispo=curformdat->getDisposition();
@@ -1564,10 +1583,19 @@ namespace authdb {
                                        gpodat->setGpoValue(false);
                                    else
                                        gpodat->setGpoValue(true);
                                }else if(strcmp(curdispo->getValue(),"gpoingroup")==0 ){
                                    curformdat->Value.push_back('\0');
                                    uuid_parse(curformdat->Value.data(),allow.uid[i++]);
                                }
                            }
                        }
                    }

                    gpodat->setAllowed(&allow);

                    Gpo gpo;

                    delete[] allow.uid;
                }
            }

@@ -1609,9 +1637,10 @@ namespace authdb {
                        delete[] cur.data;
                }
            }
            form <<"</select></td><td class=\"switchgpogroup\"><p><a class=\"button\" onclick=\"moveElement('notingroup','ingroup')\">&rarr;</a>"
                  << "</p><p><a class=\"button\" onclick=\"moveElement('ingroup','notingroup')\" >&larr;</a></p></td>"
                  <<"<td><select id=\"ingroup\" class=\"selectionlist\" multiple>";
            form <<"</select></td><td class=\"switchgpogroup\">"
                  << "<p><a class=\"button\" onclick=\"moveElement('notingroup','gpoingroup')\">&rarr;</a>"
                  << "</p><p><a class=\"button\" onclick=\"moveElement('gpoingroup','notingroup')\" >&larr;</a></p></td>"
                  <<"<td><select name=\"gpoingroup\" id=\"gpoingroup\" class=\"selectionlist\" multiple>";

            form <<"</select></td></tr>"
                  << "<tr><td></td><td></td><td><input type=\"submit\" value=\"Save\"></td></tr>"
+1 −1
Changes for src/gpo.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ bool authdb::GpoData::getGpoValue(){



void authdb::GpoData::setAllowed(Allow *allowed, bool dest){
void authdb::GpoData::setAllowed(Allow *allowed){
        AuthData *curec=this;

        uuid_t gid;
+1 −2
Changes for src/gpo.h: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -48,13 +48,12 @@ namespace authdb {
        void setGpoValue(bool dest);
        bool getGpoValue();

    protected:
        struct Allow {
            size_t  count;
            uuid_t *uid;
        };
    public:
        void setAllowed(Allow *allowed, bool dest);
        void setAllowed(Allow *allowed);
        void getAlowed(Allow *allowed);
    private:
        AuthData::Record *_Name;