Place managers may need a chance to clean up after a failed permissions
check; so we give them a callback for such contingencies. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1780 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: PlaceManager.java,v 1.37 2002/10/06 00:44:58 mdb Exp $
|
// $Id: PlaceManager.java,v 1.38 2002/10/06 03:31:16 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.crowd.server;
|
package com.threerings.crowd.server;
|
||||||
|
|
||||||
@@ -187,6 +187,15 @@ public class PlaceManager
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called if the permissions check failed, to give place managers a
|
||||||
|
* chance to do any cleanup that might be necessary due to their early
|
||||||
|
* initialization or permissions checking code.
|
||||||
|
*/
|
||||||
|
protected void permissionsFailed ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by the place manager after the place object has been
|
* Called by the place manager after the place object has been
|
||||||
* successfully created.
|
* successfully created.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: PlaceRegistry.java,v 1.23 2002/10/06 02:37:58 mdb Exp $
|
// $Id: PlaceRegistry.java,v 1.24 2002/10/06 03:31:16 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.crowd.server;
|
package com.threerings.crowd.server;
|
||||||
|
|
||||||
@@ -111,6 +111,9 @@ public class PlaceRegistry
|
|||||||
// if it fails any permissions checks
|
// if it fails any permissions checks
|
||||||
String errmsg = pmgr.checkPermissions();
|
String errmsg = pmgr.checkPermissions();
|
||||||
if (errmsg != null) {
|
if (errmsg != null) {
|
||||||
|
// give the place manager a chance to clean up after its early
|
||||||
|
// initialization process
|
||||||
|
pmgr.permissionsFailed();
|
||||||
throw new InvocationException(errmsg);
|
throw new InvocationException(errmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user