Changeset b8276a2


Ignore:
Timestamp:
05/21/13 07:45:19 (19 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
0351cf5
Parents:
14f87ef
git-author:
Ken Moore <ken@…> (05/21/13 07:03:14)
git-committer:
Ken Moore <ken@…> (05/21/13 07:45:19)
Message:

Oops, looks like I accidentally pasted a function from the old AppCafe? into the EasyPBI GUI... :-P

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/EasyPBI/mainGUI.cpp

    rda99d41 rb8276a2  
    123123} 
    124124 
    125 void PBM::checkGroupOperator() 
    126 { 
    127    QString loginName = getlogin(); 
    128    QStringList gNames; 
    129    if ( loginName == "root" ) 
    130      return; 
    131  
    132    QString tmp; 
    133    QFile iFile("/etc/group"); 
    134    if ( ! iFile.open(QIODevice::ReadOnly | QIODevice::Text)) 
    135      return; 
    136                  
    137    while ( !iFile.atEnd() ) { 
    138      tmp = iFile.readLine().simplified(); 
    139      if ( tmp.indexOf("operator") == 0 ) { 
    140         gNames = tmp.section(":", 3, 3).split(","); 
    141         break; 
    142      } 
    143    } 
    144    iFile.close(); 
    145          
    146    for ( int i = 0; i < gNames.size(); ++i ) 
    147       if ( gNames.at(i).indexOf(loginName) == 0 ) 
    148             return; 
    149  
    150    QMessageBox::information( this, tr("Error!"), tr("Installing applications has been disabled for this user. Please add the user to the operator group or restart as root.") ); 
    151    close();   
    152 } 
    153  
    154125void MainGUI::slotSingleInstance(){ 
    155126  this->showNormal(); 
Note: See TracChangeset for help on using the changeset viewer.