Extract our permission policy into a separate class so that a system can more
easily make use of different permission policies in different circumstances (one can imagine a hypothetical partner who has different access control requirements, perhaps). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5118 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -22,22 +22,30 @@
|
||||
package com.threerings.crowd.server;
|
||||
|
||||
import com.threerings.presents.data.ClientObject;
|
||||
import com.threerings.presents.data.PermissionPolicy;
|
||||
import com.threerings.presents.server.ClientResolver;
|
||||
|
||||
import com.threerings.crowd.data.BodyObject;
|
||||
import com.threerings.crowd.data.CrowdPermissionPolicy;
|
||||
|
||||
/**
|
||||
* Used to configure crowd-specific client object data.
|
||||
*/
|
||||
public class CrowdClientResolver extends ClientResolver
|
||||
{
|
||||
// documentation inherited
|
||||
@Override // from ClientResolver
|
||||
public ClientObject createClientObject ()
|
||||
{
|
||||
return new BodyObject();
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
@Override // from ClientResolver
|
||||
public PermissionPolicy createPermissionPolicy ()
|
||||
{
|
||||
return new CrowdPermissionPolicy();
|
||||
}
|
||||
|
||||
@Override // from ClientResolver
|
||||
protected void resolveClientData (ClientObject clobj)
|
||||
throws Exception
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user