#NEWLINE# def InferUserAndSubjectFromUrn( self ) : #NEWLINE# #INDENT# 'Infers user name and subject urn from self.urn.' #NEWLINE# ( _ , hunts_str , hunt_id , user , _ ) = self . urn . Split ( 5 ) #NEWLINE# if ( hunts_str != 'hunts' ) : #NEWLINE# #INDENT# raise access_control . UnauthorizedAccess ( ( 'Approval object has invalid urn %s.' % self . urn ) , requested_access = self . token . requested_access ) #NEWLINE# #UNINDENT# return ( _ , aff4 . ROOT_URN . Add ( 'hunts' ) . Add ( hunt_id ) )