[OLPC Security] Use of PermissionSet()

Ivan Krstić krstic at solarsail.hcs.harvard.edu
Thu Nov 8 12:08:26 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 8, 2007, at 11:29 AM, Marcus Leech wrote:
> What is the usage for PermissionSet()?

pset = PermissionSet(file('permissions.info'))
if pset.has_permission('use_camera'):
    # do stuff

I'll add a fix to support "if 'use_camera' in pset" syntax in a bit.

- --
Ivan Krstić <krstic at solarsail.hcs.harvard.edu> | http://radian.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHM0KKAlZZ0BR8ci0RAv4dAKCMX4lrRwtzBYowUOh/wZO7obvv6gCgkLXz
w+mLGXMllwhayTX/eS+Nqjk=
=fhrz
-----END PGP SIGNATURE-----


More information about the Security mailing list