Discussion:
[OLPC Security] Use of PermissionSet()
Marcus Leech
2007-11-08 16:29:15 UTC
Permalink
Ivan:

What is the usage for PermissionSet()?

here's what I have:

fp = open ((join(bundle_path, 'permissions.info'))
PSet = PermissionSet(fp=fp)

...
...
if Pset.has_permission ('use_camera') == True:
# Begin armageddon...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.laptop.org/pipermail/security/attachments/20071108/b4f9f9a9/attachment.pgp
Ivan Krstić
2007-11-08 17:08:26 UTC
Permalink
Post by Marcus Leech
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
Loading...