(options, args) = parser.parse_args() if len(args)<3: print "Missing username access identifier" exit(0) username = check_username(args[1]) if not username: print "The given username is invalid." exit(0) access_ident = args[2] am = AccessManager() try: res = am.check_permission(username,access_ident) except Exception, e: print e print "An error occured while writing to the user LDAP database" exit(res) if res==-13301: print 'User "%s" does not exist' % username exit(res) if res==1: print "User has permission." if res==0: print "User does not have permission." exit(res) if cmd == "list_permissions":