fix: set privileges as well as rights
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 16 May 2010 17:50:36 +0000 (17:50 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 16 May 2010 17:50:36 +0000 (17:50 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@463 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/mwin/acltabs.cpp
wob/user.wolf
www/inc/machine/muser.php

index 65965b6..04a6998 100644 (file)
@@ -673,6 +673,7 @@ void MRoleTab::editRights()
        MCheckList acl;
        QStringList rrights=gr.getrole().value().rights();
        QStringList arights=ar.getrights();
+       qSort(arights);
        for(int i=0;i<arights.size();i++){
                QString nm=arights[i];
                QString lb;
index 4e56c33..415e829 100644 (file)
        </Transaction>
        
        <Transaction name="GetAllRightNames" updating="no">
-               <Call lang="php" method="$this->setrights(WobTransaction::transactionNames()+WobTransaction::privilegeNames());"/>
+               <Call lang="php" method="$this->setrights(array_merge(WobTransaction::transactionNames(),WobTransaction::privilegeNames()));"/>
                <Output>
                        <Var name="rights" type="List:astring"/>
                </Output>
index 7f24d7d..11f6585 100644 (file)
@@ -305,8 +305,8 @@ class MachineUser
                        return;
                }
                //check rights
-               $allrights=WobTransaction::transactionNames();
-               $allrights+=WobTransaction::privilegeNames();
+               $allrights=array_merge(WobTransaction::transactionNames(),
+                       WobTransaction::privilegeNames());
                $set=$trans->getrights();
                foreach($set as $r){
                        if(!in_array($r,$allrights)){