Move some low-level object access control into Presents from Crowd (default all
objects to non-modifiable, restrict client object subscriptions to the client in question). Modified Peer code to not log a warning when a peer is not online in an expected way (not listening for connections). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4598 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -32,6 +32,7 @@ import com.threerings.util.signal.SignalManager;
|
||||
|
||||
import com.threerings.presents.Log;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.dobj.AccessController;
|
||||
import com.threerings.presents.server.net.ConnectionManager;
|
||||
|
||||
/**
|
||||
@@ -118,6 +119,9 @@ public class PresentsServer
|
||||
// create our distributed object manager
|
||||
omgr = createDObjectManager();
|
||||
|
||||
// configure the dobject manager with our access controller
|
||||
omgr.setDefaultAccessController(createDefaultObjectAccessController());
|
||||
|
||||
// create and start up our invoker
|
||||
invoker = new PresentsInvoker(omgr);
|
||||
invoker.start();
|
||||
@@ -167,6 +171,15 @@ public class PresentsServer
|
||||
return new PresentsDObjectMgr();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the default object access policy for all {@link DObject} instances. The default
|
||||
* default policy is to allow all subscribers but reject all modifications by the client.
|
||||
*/
|
||||
protected AccessController createDefaultObjectAccessController ()
|
||||
{
|
||||
return PresentsObjectAccess.DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the port on which the connection manager will listen for
|
||||
* client connections.
|
||||
|
||||
Reference in New Issue
Block a user