#NEWLINE# def update_rbac_policy( self , context , id , rbac_policy ) : #NEWLINE# #INDENT# pol = rbac_policy [ 'rbac_policy' ] #NEWLINE# entry = self . _get_rbac_policy ( context , id ) #NEWLINE# object_type = entry [ 'object_type' ] #NEWLINE# try : #NEWLINE# #INDENT# registry . notify ( RBAC_POLICY , events . BEFORE_UPDATE , self , context = context , policy = entry , object_type = object_type , policy_update = pol ) #NEWLINE# #UNINDENT# except c_exc . CallbackFailure as ex : #NEWLINE# #INDENT# raise ext_rbac . RbacPolicyInUse ( object_id = entry [ 'object_id' ] , details = self ) #NEWLINE# #UNINDENT# with context . session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# entry . update ( pol ) #NEWLINE# #UNINDENT# return self . _make_rbac_policy_dict ( entry )