Commit f144c949 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent cee77d8d
......@@ -17,6 +17,7 @@
import inspect
import os
import sys
import pickle
import datetime
......@@ -63,7 +64,8 @@ class NG6Workflow (Workflow):
self.metadata.append("project_id="+str(self.args["project_id"]))
# if user is not allowed to add data on project (is not admin)
if self.project is not None and not self.project.is_admin(self.args["admin_login"]):
raise ValueError( "The user login '" + self.args["admin_login"] + "' is not allowed to add data on project '" + self.project.name + "'." )
sys.stderr.write( "The user login '" + self.args["admin_login"] + "' is not allowed to add data on project '" + self.project.name + "'.\n" )
sys.exit()
# if starting from a brand new project
elif self.args.has_key("project_name") and self.args.has_key("project_description") and self.args.has_key("admin_login"):
self.project = Project(self.args["project_name"], self.args["project_description"], self.args["admin_login"])
......@@ -75,7 +77,8 @@ class NG6Workflow (Workflow):
project = Project.get_from_run_id(self.args["run_id"])
# if user is not allowed to add data on project (is not admin)
if not project.is_admin(self.args["admin_login"]):
raise ValueError( "The user login '" + self.args["admin_login"] + "' is not allowed to add data on project '" + project.name + "'." )
sys.stderr.write( "The user login '" + self.args["admin_login"] + "' is not allowed to add data on project '" + project.name + "'." )
sys.exit()
self.runobj = Run.get_from_id(self.args["run_id"])
self.metadata.append("run_id="+str(self.args["run_id"]))
# if starting from a brand new run
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment