Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9591 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 28, 2006, 11:51:26 PM (18 years ago)
Author:
patrick
Message:

proxy server permissions do not yet work absolutly well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/synchronizeable.cc

    r9590 r9591  
    210210    // check if this synchronizeable has the permissions to write the data
    211211
    212     // first check MASTER_SERVER permissions
     212    //  MASTER_SERVER |====> *
    213213    if( SharedNetworkData::getInstance()->isMasterServer() && (*it)->checkPermission( PERMISSION_MASTER_SERVER ))
    214214      hasPermission = true;
    215     // now check PROXY_SERVER permissions
     215    else if( SharedNetworkData::getInstance()->isMasterServer() && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
     216      hasPermission = true;
     217    // PROXY_SERVER  |====> *
    216218    else if( SharedNetworkData::getInstance()->isProxyServerActive() && (*it)->checkPermission( PERMISSION_PROXY_SERVER ))
    217219      hasPermission = true;
    218     // now check OWNER permissions
     220    else if( SharedNetworkData::getInstance()->isProxyServerActive() && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
     221      hasPermission = true;
     222    // OWNER         |====> *
    219223    else if( this->owner == SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ))
    220224      hasPermission = true;
    221     // now check ALL permissions
     225    // ALL           |====> *
    222226    else if( (*it)->checkPermission( PERMISSION_ALL ))
    223       hasPermission = true;
    224     // SPECIAL: get write permissions if i am master server and i am able to overwrite the client stuff
    225 #warning this could probably override also clients that are connected to another proxy: the master server overwrites it
    226     else if( SharedNetworkData::getInstance()->isMasterServer() && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
    227227      hasPermission = true;
    228228    // SPECIAL: permission to forward syncs from the master server to the clients
Note: See TracChangeset for help on using the changeset viewer.