@no_auto_transaction
@must_be_valid_project
@must_have_permission(ADMIN)
@must_not_be_registration
def project_manage_contributors(auth, node, **kwargs):
 contributors = request.json.get('contributors')
 try:
  node.manage_contributors(contributors, auth=auth, save=True)
 except (ValueError, NodeStateError) as error:
  raise HTTPError(http.BAD_REQUEST, data={'message_long': error.args[0]})
 if (not node.is_contributor(auth.user)):
  status.push_status_message('You have removed yourself as a contributor from this project', kind='success', trust=False)
  if node.is_public:
   return {'redirectUrl': node.url}
  return {'redirectUrl': web_url_for('dashboard')}
 if (not node.has_permission(auth.user, ADMIN)):
  status.push_status_message('You have removed your administrative privileges for this project', kind='success', trust=False)
 return {}

@ no_auto_transaction @ must_be_valid_project @ must_have_permission ( ADMIN ) @ must_not_be_registration def project_manage_contributors ( auth , node , ** kwargs ) : contributors = request . json . get ( 'contributors' ) try : node . manage_contributors ( contributors , auth = auth , save = True ) except ( ValueError , NodeStateError ) as error : raise HTTPError ( http . BAD_REQUEST , data = { 'message_long' : error . args [ 0 ] } ) if ( not node . is_contributor ( auth . user ) ) : status . push_status_message ( 'You have removed yourself as a contributor from this project' , kind = 'success' , trust = False ) if node . is_public : return { 'redirectUrl' : node . url } return { 'redirectUrl' : web_url_for ( 'dashboard' ) } if ( not node . has_permission ( auth . user , ADMIN ) ) : status . push_status_message ( 'You have removed your administrative privileges for this project' , kind = 'success' , trust = False ) return { }
reorder and remove contributors .