Perform the permissions check.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1779 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-10-06 02:37:58 +00:00
parent 37c4f866fd
commit f3385ad3a8
@@ -1,5 +1,5 @@
// //
// $Id: PlaceRegistry.java,v 1.22 2002/10/06 00:44:58 mdb Exp $ // $Id: PlaceRegistry.java,v 1.23 2002/10/06 02:37:58 mdb Exp $
package com.threerings.crowd.server; package com.threerings.crowd.server;
@@ -91,14 +91,22 @@ public class PlaceRegistry
PlaceConfig config, CreationObserver observer) PlaceConfig config, CreationObserver observer)
throws InstantiationException, InvocationException throws InstantiationException, InvocationException
{ {
PlaceManager pmgr = null;
try { try {
// load up the manager class // load up the manager class
Class pmgrClass = Class.forName(config.getManagerClassName()); Class pmgrClass = Class.forName(config.getManagerClassName());
// create a place manager for this place // create a place manager for this place
PlaceManager pmgr = (PlaceManager)pmgrClass.newInstance(); pmgr = (PlaceManager)pmgrClass.newInstance();
// let the pmgr know about us and its configuration // let the pmgr know about us and its configuration
pmgr.init(this, _invmgr, _omgr, config); pmgr.init(this, _invmgr, _omgr, config);
} catch (Exception e) {
Log.logStackTrace(e);
throw new InstantiationException(
"Error creating place manager [config=" + config + "].");
}
// give the manager an opportunity to abort the whole process // give the manager an opportunity to abort the whole process
// if it fails any permissions checks // if it fails any permissions checks
String errmsg = pmgr.checkPermissions(); String errmsg = pmgr.checkPermissions();
@@ -115,12 +123,6 @@ public class PlaceRegistry
_omgr.createObject(pmgr.getPlaceObjectClass(), this); _omgr.createObject(pmgr.getPlaceObjectClass(), this);
return pmgr; return pmgr;
} catch (Exception e) {
Log.logStackTrace(e);
throw new InstantiationException(
"Error creating place manager [config=" + config + "].");
}
} }
/** /**