From f7a828e0c4e6bc603c012e34bd880c3089eaadf1 Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Thu, 27 May 2010 20:29:12 +0000 Subject: [PATCH] Move this convenience method up here to the ClientObject because it's... well... convenient. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6068 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/presents/data/ClientObject.as | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/as/com/threerings/presents/data/ClientObject.as b/src/as/com/threerings/presents/data/ClientObject.as index 6ffb177e4..24086acff 100644 --- a/src/as/com/threerings/presents/data/ClientObject.as +++ b/src/as/com/threerings/presents/data/ClientObject.as @@ -62,6 +62,15 @@ public class ClientObject extends DObject return "(" + username + ":" + getOid() + ")"; } + /** + * Convenience wrapper around {@link #checkAccess(Permission)} that simply returns a boolean + * indicating whether or not this client has the permission rather than an explanation. + */ + public function hasAccess (perm :Permission) :Boolean + { + return checkAccess(perm) == null; + } + /** * Checks whether or not this client has the specified permission. *