#NEWLINE# def rbac_decorate( method , roles , proxy_role = '' , proxy_types = None ) : #NEWLINE# #INDENT# "\n    Post-definition decorator for specifying RBAC roles for a method.\n    Not typically used but needed if `proxy_types` must include the\n    class currently being defined, since the normal decorator won't see\n    the class yet.\n\n    method: instancemethod\n        Method to be decorated.\n\n    roles: string or sequence[string]\n        Role name patterns which are allowed access.\n\n    proxy_role: string\n        Role to use during execution of method.\n        A null string implies that the current role is used.\n\n    proxy_types: list[class]\n        Types of return values that must be proxied.\n    " #NEWLINE# roles = ( ( roles , ) if isinstance ( roles , basestring ) else tuple ( roles ) ) #NEWLINE# proxy_types = ( ( ) if ( proxy_types is None ) else tuple ( proxy_types ) ) #NEWLINE# method . __func__ . _rbac = ( roles , proxy_types , proxy_types , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )