@must_be_valid_project
@must_have_permission(ADMIN)
def node_identifiers_post(auth, node, **kwargs):
 if ((not node.is_public) or node.is_retracted):
  raise HTTPError(http.BAD_REQUEST)
 if (node.get_identifier('doi') or node.get_identifier('ark')):
  raise HTTPError(http.BAD_REQUEST)
 try:
  identifiers = _get_or_create_identifiers(node)
 except HTTPError:
  raise HTTPError(http.BAD_REQUEST)
 for (category, value) in identifiers.iteritems():
  node.set_identifier_value(category, value)
 node.add_log(NodeLog.EXTERNAL_IDS_ADDED, params={'parent_node': node.parent_id, 'node': node._id, 'identifiers': identifiers}, auth=auth)
 return (identifiers, http.CREATED)

@ must_be_valid_project @ must_have_permission ( ADMIN ) def node_identifiers_post ( auth , node , ** kwargs ) : if ( ( not node . is_public ) or node . is_retracted ) : raise HTTPError ( http . BAD_REQUEST ) if ( node . get_identifier ( 'doi' ) or node . get_identifier ( 'ark' ) ) : raise HTTPError ( http . BAD_REQUEST ) try : identifiers = _get_or_create_identifiers ( node ) except HTTPError : raise HTTPError ( http . BAD_REQUEST ) for ( category , value ) in identifiers . iteritems ( ) : node . set_identifier_value ( category , value ) node . add_log ( NodeLog . EXTERNAL_IDS_ADDED , params = { 'parent_node' : node . parent_id , 'node' : node . _id , 'identifiers' : identifiers } , auth = auth ) return ( identifiers , http . CREATED )
create identifier pair for a node .