Beispiel #1
0
def create_service(login_asso, login_president):
  if not confirm("Are you sure the service or asso does not exist already ?", False):
    abort("")
  mdp1 = gen_mdp.gen_mdp(8)
  mdp2 = gen_mdp.gen_mdp(8)
  execute(files.add_user,login_asso, mdp1)
  execute(web.add_web,login_asso)
  execute(portail.add_portail,login_asso)
  execute(sql.add_sql,login_asso, mdp2)
  execute(python.add_user,login_asso)
  execute(mail.send_passwords,login_asso, login_president, mdp1, mdp2)
Beispiel #2
0
def create_asso(login_asso):
  login_president = execute(sql.get_asso_president,login_asso)['sql.mde.utc']
  if not confirm("Are you sure the asso does not exist already ?", False):
    abort("")
  mdp1 = gen_mdp.gen_mdp(8)
  mdp2 = gen_mdp.gen_mdp(8)
  execute(files.add_user,login_asso, mdp1)
  execute(mail.add_mail,login_asso)
  execute(mail.add_assotous,login_asso)
  execute(web.add_web,login_asso)
  execute(portail.add_portail,login_asso)
  execute(sql.add_sql,login_asso, mdp2)
  execute(python.add_user,login_asso)
  execute(mail.send_passwords,login_asso, login_president, mdp1, mdp2)
Beispiel #3
0
def add_assotous(login_asso):  
  print("connexion a la bdd mailman")
  mdp = gen_mdp.gen_mdp(8)
  db=MySQLdb.connect(host=env.config['mysql']['host'], user=env.config['mysql']['username'], passwd=env.config['mysql']['password'], db="mail")
  c=db.cursor() 
  print("ajout dans la bdd mailman")
  c.execute("INSERT INTO mailman_mysql (listname, address, hide, nomail, ack, not_metoo, digest, plain, password, lang, name, one_last_digest, user_options, delivery_status, topics_userinterest, delivery_status_timestamp, bi_cookie, bi_score, bi_noticesleft, bi_lastnotice, bi_date) VALUES ('asso-tous', '*****@*****.**', 'N', 'N', 'Y', 'Y', 'N', 'N', '%s', 'fr', '', 'N', '392', '0', NULL, '0000-00-00 00:00:00', NULL, '0', '0', '0000-00-00', '0000-00-00')" % (login_asso, mdp))
  db.commit()
  c.close()
  db.close()
Beispiel #4
0
def change_password_mysql_service(login_service,login_president):
  mdp = gen_mdp.gen_mdp(8)
  execute(sql.change_passwd,login_service, mdp)
  execute(mail.send_new_password_sql,login_service, login_president, mdp)
Beispiel #5
0
def change_password_service(login_service,login_president):
  mdp = gen_mdp.gen_mdp(8)
  execute(files.change_passwd,login_service, mdp)
  execute(mail.send_new_password_asso,login_service, login_president, mdp)
Beispiel #6
0
def change_password_mysql(login_asso):
  login_president = execute(sql.get_asso_president,login_asso)['sql.mde.utc']
  mdp = gen_mdp.gen_mdp(8)
  execute(sql.change_passwd,login_asso, mdp)
  execute(mail.send_new_password_sql,login_asso, login_president, mdp)