Package twisted :: Package spread :: Module jelly :: Class SecurityOptions

[frames | no frames]

## Class SecurityOptions

This will by default disallow everything, except for 'none'.

Method Summary
| ``__init__`(self)` SecurityOptions() Initialize.
| ``allowBasicTypes`(self)` SecurityOptions.allowBasicTypes() Allow all `basic' types.
| ``allowInstancesOf`(self, *classes)` SecurityOptions.allowInstances(klass, klass, ...): allow instances of the specified classes
| ``allowModules`(self, *modules)` SecurityOptions.allowModules(module, module, ...): allow modules by name This will also allow the 'module' type.
| ``allowTypes`(self, *types)` SecurityOptions.allowTypes(typeString): Allow a particular type, by its name.
| ``isClassAllowed`(self, klass)` SecurityOptions.isClassAllowed(class) -> boolean Assumes the module has already been allowed.
| ``isModuleAllowed`(self, moduleName)` SecurityOptions.isModuleAllowed(moduleName) -> boolean returns 1 if a module by that name is allowed, 0 otherwise
| ``isTypeAllowed`(self, typeName)` SecurityOptions.isTypeAllowed(typeName) -> boolean Returns 1 if the given type is allowed, 0 otherwise.

Class Variable Summary
`list` | `basicTypes` = `['dictionary', 'list', 'tuple', 'reference'...`

Method Details

### __init__(self)
(Constructor)

SecurityOptions() Initialize.

### allowBasicTypes(self)

SecurityOptions.allowBasicTypes() Allow all `basic' types. (Dictionary and list. Int, string, and float are implicitly allowed.)

### allowInstancesOf(self, *classes)

SecurityOptions.allowInstances(klass, klass, ...): allow instances of the specified classes

This will also allow the 'instance', 'class' (renamed 'classobj' in Python 2.3), and 'module' types, as well as basic types.

### allowModules(self, *modules)

SecurityOptions.allowModules(module, module, ...): allow modules by name This will also allow the 'module' type.

### allowTypes(self, *types)

SecurityOptions.allowTypes(typeString): Allow a particular type, by its name.

### isClassAllowed(self, klass)

SecurityOptions.isClassAllowed(class) -> boolean Assumes the module has already been allowed. Returns 1 if the given class is allowed, 0 otherwise.

### isModuleAllowed(self, moduleName)

SecurityOptions.isModuleAllowed(moduleName) -> boolean returns 1 if a module by that name is allowed, 0 otherwise

### isTypeAllowed(self, typeName)

SecurityOptions.isTypeAllowed(typeName) -> boolean Returns 1 if the given type is allowed, 0 otherwise.

Class Variable Details

### basicTypes

  Type:
    `list`
  Value:

        ['dictionary',
         'list',
         'tuple',
         'reference',
         'dereference',
         'unpersistable',
         'persistent',
         'long_int',
        ...

Generated by Epydoc 2.0 on Sat May 15 20:07:55 2004 | http://epydoc.sf.net