Package twisted :: Package spread :: Module newjelly :: Class SecurityOptions

[show private | hide private]
[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`

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 1.1 on Thu May 8 13:19:02 2003 | http://epydoc.sf.net