Protocol-based Permissions
Solution
try:
# is the technicians name a key in the dictionary created from the config file
# if so find the groups the techician has been assigned in the config
config_groups = (configDict[first,last]).split(",")
step_approved = [y.strip() for y in (args["groups"].split(","))]
if bool(set(config_groups) & set(step_approved)) is False:
#fail script, stop user from moving forward and have the last print statement appear in message
print "Nice try %s %s, but you have not been approved to run this step % (first, last )
exit (-1)
except:
print "This technician's name has not been included in the config file "
exit (-1Parameters
User Interaction
Assumptions and Notes
Attachments
Last updated
Was this helpful?
