diff --git a/src/java/com/threerings/presents/data/ClientObject.java b/src/java/com/threerings/presents/data/ClientObject.java index b386abc8a..0b9fdeb43 100644 --- a/src/java/com/threerings/presents/data/ClientObject.java +++ b/src/java/com/threerings/presents/data/ClientObject.java @@ -80,10 +80,27 @@ public class ClientObject extends DObject { return checkAccess(perm, null); } + + /** + * Convenience wrapper around {@link #checkAccess} that simply returns a boolean indicating + * whether or not this client has the permission rather than an explanation. + */ + public boolean hasAccess (Permission perm, Object context) + { + return checkAccess(perm, context) == null; + } + + /** + * Convenience wrapper around {@link #checkAccess} that simply returns a boolean indicating + * whether or not this client has the permission rather than an explanation. + */ + public boolean hasAccess (Permission perm) + { + return checkAccess(perm) == null; + } /** - * Used for reference counting client objects, adds a reference to - * this object. + * Used for reference counting client objects, adds a reference to this object. */ public synchronized void reference () {