class documentation

class twisted.spread.jelly.SecurityOptions: (source)

View In Hierarchy

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

Class Variable basicTypes Undocumented
Method __init__ SecurityOptions() initialize.
Instance Variable allowedTypes Undocumented
Instance Variable allowedModules Undocumented
Instance Variable allowedClasses Undocumented
Method allowBasicTypes Allow all `basic' types. (Dictionary and list. Int, string, and float are implicitly allowed.)
Method allowTypes SecurityOptions.allowTypes(typeString): Allow a particular type, by its name.
Method allowInstancesOf SecurityOptions.allowInstances(klass, klass, ...): allow instances of the specified classes
Method allowModules SecurityOptions.allowModules(module, module, ...): allow modules by name. This will also allow the 'module' type.
Method isModuleAllowed SecurityOptions.isModuleAllowed(moduleName) -> boolean returns 1 if a module by that name is allowed, 0 otherwise
Method isClassAllowed SecurityOptions.isClassAllowed(class) -> boolean Assumes the module has already been allowed. Returns 1 if the given class is allowed, 0 otherwise.
Method isTypeAllowed SecurityOptions.isTypeAllowed(typeName) -> boolean Returns 1 if the given type is allowed, 0 otherwise.
basicTypes = (source)

Undocumented

(type: list[str])
def __init__(self): (source)

SecurityOptions() initialize.

allowedTypes = (source)

Undocumented

(type: dict[bytes, int])
allowedModules = (source)

Undocumented

(type: dict)
allowedClasses = (source)

Undocumented

(type: dict)
def allowBasicTypes(self): (source)

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

def allowTypes(self, *types): (source)

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

def allowInstancesOf(self, *classes): (source)

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.

def allowModules(self, *modules): (source)

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

def isModuleAllowed(self, moduleName): (source)

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

def isClassAllowed(self, klass): (source)

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

def isTypeAllowed(self, typeName): (source)

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

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.