Merge branch 'master' into Develop
# Conflicts: # cps/templates/list.html # cps/translations/cs/LC_MESSAGES/messages.po # cps/translations/de/LC_MESSAGES/messages.po # cps/translations/es/LC_MESSAGES/messages.po # cps/translations/fi/LC_MESSAGES/messages.po # cps/translations/fr/LC_MESSAGES/messages.po # cps/translations/hu/LC_MESSAGES/messages.po # cps/translations/it/LC_MESSAGES/messages.po # cps/translations/ja/LC_MESSAGES/messages.po # cps/translations/km/LC_MESSAGES/messages.po # cps/translations/nl/LC_MESSAGES/messages.po # cps/translations/pl/LC_MESSAGES/messages.po # cps/translations/ru/LC_MESSAGES/messages.po # cps/translations/sv/LC_MESSAGES/messages.po # cps/translations/uk/LC_MESSAGES/messages.po # cps/translations/zh_Hans_CN/LC_MESSAGES/messages.po # messages.pot
This commit is contained in:
+16
-7
@@ -547,7 +547,7 @@ def _configuration_update_helper():
|
||||
if config.config_login_type == constants.LOGIN_LDAP:
|
||||
reboot_required |= _config_string("config_ldap_provider_url")
|
||||
reboot_required |= _config_int("config_ldap_port")
|
||||
# _config_string("config_ldap_schema")
|
||||
reboot_required |= _config_int("config_ldap_authentication")
|
||||
reboot_required |= _config_string("config_ldap_dn")
|
||||
reboot_required |= _config_string("config_ldap_serv_username")
|
||||
reboot_required |= _config_string("config_ldap_user_object")
|
||||
@@ -569,9 +569,13 @@ def _configuration_update_helper():
|
||||
return _configuration_result(_('Please Enter a LDAP Provider, '
|
||||
'Port, DN and User Object Identifier'), gdriveError)
|
||||
|
||||
|
||||
if not config.config_ldap_serv_username or not bool(config.config_ldap_serv_password):
|
||||
return _configuration_result('Please Enter a LDAP Service Account and Password', gdriveError)
|
||||
if config.config_ldap_authentication > constants.LDAP_AUTH_ANONYMOUS:
|
||||
if config.config_ldap_authentication > constants.LDAP_AUTH_UNAUTHENTICATE:
|
||||
if not config.config_ldap_serv_username or not bool(config.config_ldap_serv_password):
|
||||
return _configuration_result('Please Enter a LDAP Service Account and Password', gdriveError)
|
||||
else:
|
||||
if not config.config_ldap_serv_username:
|
||||
return _configuration_result('Please Enter a LDAP Service Account', gdriveError)
|
||||
|
||||
#_config_checkbox("config_ldap_use_ssl")
|
||||
#_config_checkbox("config_ldap_use_tls")
|
||||
@@ -830,9 +834,8 @@ def edit_user(user_id):
|
||||
if request.method == "POST":
|
||||
to_save = request.form.to_dict()
|
||||
if "delete" in to_save:
|
||||
if ub.session.query(ub.User).filter(and_(ub.User.role.op('&')
|
||||
(constants.ROLE_ADMIN)== constants.ROLE_ADMIN,
|
||||
ub.User.id != content.id)).count():
|
||||
if ub.session.query(ub.User).filter(ub.User.role.op('&')(constants.ROLE_ADMIN) == constants.ROLE_ADMIN,
|
||||
ub.User.id != content.id).count():
|
||||
ub.session.query(ub.User).filter(ub.User.id == content.id).delete()
|
||||
ub.session.commit()
|
||||
flash(_(u"User '%(nick)s' deleted", nick=content.nickname), category="success")
|
||||
@@ -841,6 +844,12 @@ def edit_user(user_id):
|
||||
flash(_(u"No admin user remaining, can't delete user", nick=content.nickname), category="error")
|
||||
return redirect(url_for('admin.admin'))
|
||||
else:
|
||||
if not ub.session.query(ub.User).filter(ub.User.role.op('&')(constants.ROLE_ADMIN) == constants.ROLE_ADMIN,
|
||||
ub.User.id != content.id).count() and \
|
||||
not 'admin_role' in to_save:
|
||||
flash(_(u"No admin user remaining, can't remove admin role", nick=content.nickname), category="error")
|
||||
return redirect(url_for('admin.admin'))
|
||||
|
||||
if "password" in to_save and to_save["password"]:
|
||||
content.password = generate_password_hash(to_save["password"])
|
||||
anonymous = content.is_anonymous
|
||||
|
||||
+1
-3
@@ -95,12 +95,10 @@ class _Settings(_Base):
|
||||
|
||||
config_ldap_provider_url = Column(String, default='example.org')
|
||||
config_ldap_port = Column(SmallInteger, default=389)
|
||||
# config_ldap_schema = Column(String, default='ldap')
|
||||
config_ldap_authentication = Column(SmallInteger, default=constants.LDAP_AUTH_SIMPLE)
|
||||
config_ldap_serv_username = Column(String, default='cn=admin,dc=example,dc=org')
|
||||
config_ldap_serv_password = Column(String, default="")
|
||||
config_ldap_encryption = Column(SmallInteger, default=0)
|
||||
# config_ldap_use_tls = Column(Boolean, default=False)
|
||||
# config_ldap_require_cert = Column(Boolean, default=False)
|
||||
config_ldap_cert_path = Column(String, default="")
|
||||
config_ldap_dn = Column(String, default='dc=example,dc=org')
|
||||
config_ldap_user_object = Column(String, default='uid=%s')
|
||||
|
||||
+4
-1
@@ -93,7 +93,10 @@ AUTO_UPDATE_NIGHTLY = 1 << 2
|
||||
LOGIN_STANDARD = 0
|
||||
LOGIN_LDAP = 1
|
||||
LOGIN_OAUTH = 2
|
||||
# LOGIN_OAUTH_GOOGLE = 3
|
||||
|
||||
LDAP_AUTH_ANONYMOUS = 0
|
||||
LDAP_AUTH_UNAUTHENTICATE = 1
|
||||
LDAP_AUTH_SIMPLE = 0
|
||||
|
||||
DEFAULT_MAIL_SERVER = "mail.example.org"
|
||||
|
||||
|
||||
+378
-3
@@ -8,6 +8,8 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# This file is autogenerated, do NOT add, change, or delete ANY string
|
||||
# If you need help or assistance for adding a new language, please contact the project team
|
||||
|
||||
# map iso639 language codes to language names, translated
|
||||
|
||||
@@ -852,6 +854,379 @@ LANGUAGE_NAMES = {
|
||||
"zxx": "Geen linguïstische inhoud",
|
||||
"zza": "Zaza"
|
||||
},
|
||||
"tr": {
|
||||
"abk": "Abhazca",
|
||||
"ace": "Achinese",
|
||||
"ach": "Acoli",
|
||||
"ada": "Adangme",
|
||||
"ady": "Adyghe",
|
||||
"aar": "Afar",
|
||||
"afh": "Afrihili",
|
||||
"afr": "Afrikanca",
|
||||
"ain": "Ainu (Japonca)",
|
||||
"aka": "Akanca (Afrika dili)",
|
||||
"akk": "Akatça",
|
||||
"sqi": "Albanian",
|
||||
"ale": "Alaskaca",
|
||||
"amh": "Etiyopyaca",
|
||||
"anp": "Angika",
|
||||
"ara": "Arapça",
|
||||
"arg": "Aragonca (İspanya)",
|
||||
"arp": "Arapaho (Kuzey Amerika yerlileri)",
|
||||
"arw": "Arawak (Surinam)",
|
||||
"hye": "Ermenice",
|
||||
"asm": "Assamese (Hindistan)",
|
||||
"ast": "Asturyasca",
|
||||
"ava": "Avarca",
|
||||
"ave": "Avestan (Eski İran)",
|
||||
"awa": "Awadhi (Hindistan)",
|
||||
"aym": "Aymara (Güney Amerika)",
|
||||
"aze": "Azerice",
|
||||
"ban": "Balice (Bali adaları)",
|
||||
"bal": "Belucice (İran)",
|
||||
"bam": "Bambara (Mali)",
|
||||
"bas": "Basa (Kamerun)",
|
||||
"bak": "Başkırca",
|
||||
"eus": "Baskça",
|
||||
"bej": "Beja (Eritre; Sudan)",
|
||||
"bel": "Beyaz Rusça",
|
||||
"bem": "Bemba (Zambia)",
|
||||
"ben": "Bengalce",
|
||||
"bho": "Bhojpuri (Hindistan)",
|
||||
"bik": "Bikol (Filipinler)",
|
||||
"byn": "Bilin",
|
||||
"bin": "Bini (Afrika)",
|
||||
"bis": "Bislama (Vanuatu; Kuzey Pasifik)",
|
||||
"zbl": "Blis Sembolleri",
|
||||
"bos": "Boşnakça",
|
||||
"bra": "Braj (Hindistan)",
|
||||
"bre": "Bretonca",
|
||||
"bug": "Buginese (Endonezya)",
|
||||
"bul": "Bulgarca",
|
||||
"bua": "Buriat (Moğolistan)",
|
||||
"mya": "Burmaca",
|
||||
"cad": "Caddo (Kuzey Amerika yerlileri)",
|
||||
"cat": "Katalanca",
|
||||
"ceb": "Cebuano (Filipinler)",
|
||||
"chg": "Çağatayca",
|
||||
"cha": "Chamorro (Guam adaları)",
|
||||
"che": "Çeçence",
|
||||
"chr": "Cherokee (Kuzey Amerika yerlileri)",
|
||||
"chy": "Cheyenne (kuzey Amerika yerlileri)",
|
||||
"chb": "Chibcha (Kolombiya)",
|
||||
"zho": "Çince",
|
||||
"chn": "Chinook lehçesi (Kuzey Batı Amerika kıyıları)",
|
||||
"chp": "Chipewyan (Kuzey Amerika yerlileri)",
|
||||
"cho": "Choctaw (Kuzey Amerika yerlileri)",
|
||||
"chk": "Chuukese",
|
||||
"chv": "Çuvaş (Türkçe)",
|
||||
"cop": "Kıptice (Eski Mısır)",
|
||||
"cor": "Cornish (Kelt)",
|
||||
"cos": "Korsikaca",
|
||||
"cre": "Cree (Kuzey Amerika yerlileri)",
|
||||
"mus": "Creek",
|
||||
"hrv": "Hırvatça",
|
||||
"ces": "Çekçe",
|
||||
"dak": "Dakota (Kuzey Amerika yerlileri)",
|
||||
"dan": "Danimarkaca; Danca",
|
||||
"dar": "Dargwa (Dağıstan)",
|
||||
"del": "Delaware (Kuzey Amerika yerlileri)",
|
||||
"div": "Dhivehi",
|
||||
"din": "Dinka (Sudan)",
|
||||
"doi": "Dogri (makro dili)",
|
||||
"dgr": "Dogrib (Kanada)",
|
||||
"dua": "Duala (Afrika)",
|
||||
"nld": "Flâmanca (Hollanda dili)",
|
||||
"dyu": "Dyula (Burkina Faso; Mali)",
|
||||
"dzo": "Dzongkha (Butan)",
|
||||
"efi": "Efik (Afrika)",
|
||||
"egy": "Mısırca (Eski)",
|
||||
"eka": "Ekajuk (Afrika)",
|
||||
"elx": "Elamca",
|
||||
"eng": "İngilizce",
|
||||
"myv": "Erzya dili",
|
||||
"epo": "Esperanto",
|
||||
"est": "Estonca",
|
||||
"ewe": "Ewe (Afrika)",
|
||||
"ewo": "Ewondo (Afrika)",
|
||||
"fan": "Fang (Ekvatoryal Guinea)",
|
||||
"fat": "Fanti (Afrika)",
|
||||
"fao": "Faroece",
|
||||
"fij": "Fiji dili",
|
||||
"fil": "Filipince",
|
||||
"fin": "Fince",
|
||||
"fon": "Fon (Benin)",
|
||||
"fra": "Fransızca",
|
||||
"fur": "Friulian (İtalya)",
|
||||
"ful": "Fulah (Afrika)",
|
||||
"gaa": "Ganaca",
|
||||
"glg": "Galce",
|
||||
"lug": "Ganda Dili",
|
||||
"gay": "Gayo (Sumatra)",
|
||||
"gba": "Gbaya (Orta Afrika Cumhuriyeti)",
|
||||
"gez": "Geez (Etiyopya)",
|
||||
"kat": "Gürcüce",
|
||||
"deu": "Almanca",
|
||||
"gil": "Kiribati dili",
|
||||
"gon": "Gondi (Hindistan)",
|
||||
"gor": "Gorontalo (Endonezya)",
|
||||
"got": "Gotik",
|
||||
"grb": "Grebo (Liberya)",
|
||||
"grn": "Guarani (Paraguay)",
|
||||
"guj": "Gucaratça",
|
||||
"gwi": "Gwichʼin",
|
||||
"hai": "Haida (Kuzey Amerika yerlileri)",
|
||||
"hau": "Hausa Dili",
|
||||
"haw": "Havai Dili",
|
||||
"heb": "İbranice",
|
||||
"her": "Herero Dili",
|
||||
"hil": "Hiligaynon",
|
||||
"hin": "Hintçe",
|
||||
"hmo": "Hiri Motu",
|
||||
"hit": "Hititçe",
|
||||
"hmn": "Hmong",
|
||||
"hun": "Macarca",
|
||||
"hup": "Hupa",
|
||||
"iba": "Iban",
|
||||
"isl": "İzlandaca",
|
||||
"ido": "Ido Dili",
|
||||
"ibo": "Igbo Dili",
|
||||
"ilo": "Iloko",
|
||||
"ind": "Endonezyaca",
|
||||
"inh": "İnguşca",
|
||||
"ina": "Interlingua (Uluslararası Yardımcı Dil Kurumu)",
|
||||
"ile": "Interlingue",
|
||||
"iku": "Inuktitut",
|
||||
"ipk": "Inupiak Dili",
|
||||
"gle": "İrlandaca",
|
||||
"ita": "İtalyanca",
|
||||
"jpn": "Japonca",
|
||||
"jav": "Cava Dili",
|
||||
"jrb": "Yahudi-Arapçası",
|
||||
"jpr": "Yahudi-Farsça",
|
||||
"kbd": "Kabardian",
|
||||
"kab": "Kabyle",
|
||||
"kac": "Kachin",
|
||||
"kal": "Kalaallisut",
|
||||
"xal": "Kalmyk",
|
||||
"kam": "Kamba (Kenya)",
|
||||
"kan": "Kannada",
|
||||
"kau": "Kanuri Dili",
|
||||
"kaa": "Kara-Kalpak",
|
||||
"krc": "Karachay-Balkar",
|
||||
"krl": "Karelian",
|
||||
"kas": "Keşmirce",
|
||||
"csb": "Kashubian (Lehçe diyalekti)",
|
||||
"kaw": "Kawi",
|
||||
"kaz": "Kazakça",
|
||||
"kha": "Khasi",
|
||||
"kho": "Khotanese",
|
||||
"kik": "Kikuyu Dili",
|
||||
"kmb": "Kimbundu",
|
||||
"kin": "Kinyarwanda",
|
||||
"kir": "Kırgızca",
|
||||
"tlh": "Klingon",
|
||||
"kom": "Komi Dili",
|
||||
"kon": "Kongo Dili",
|
||||
"kok": "Konkani (makro dil)",
|
||||
"kor": "Korece",
|
||||
"kos": "Kosraean",
|
||||
"kpe": "Kpelle",
|
||||
"kua": "Kuanyama Dili",
|
||||
"kum": "Kumyk",
|
||||
"kur": "Kürtçe",
|
||||
"kru": "Kurukh",
|
||||
"kut": "Kutenai",
|
||||
"lad": "Ladino",
|
||||
"lah": "Lahnda",
|
||||
"lam": "Lamba",
|
||||
"lao": "Laos Dili",
|
||||
"lat": "Latince",
|
||||
"lav": "Letonca",
|
||||
"lez": "Lezghian",
|
||||
"lim": "Liburg Dili",
|
||||
"lin": "Lingala Dili",
|
||||
"lit": "Litvanyaca",
|
||||
"jbo": "Lojban dili",
|
||||
"loz": "Lozi",
|
||||
"lub": "Luba Katanga Dili",
|
||||
"lua": "Luba-Lulua",
|
||||
"lui": "Luiseno",
|
||||
"smj": "Lule Sami",
|
||||
"lun": "Lunda",
|
||||
"luo": "Luo (Kenya ve Tanzanya)",
|
||||
"lus": "Lushai",
|
||||
"ltz": "Lüksemburg Dili",
|
||||
"mkd": "Makedonca",
|
||||
"mad": "Madurese",
|
||||
"mag": "Magahi",
|
||||
"mai": "Maithili dili",
|
||||
"mak": "Makasar",
|
||||
"mlg": "Madagaskar Dili",
|
||||
"msa": "Malay (makro dili)",
|
||||
"mal": "Malayalam",
|
||||
"mlt": "Maltaca",
|
||||
"mnc": "Manchu",
|
||||
"mdr": "Mandar",
|
||||
"man": "Mandingo",
|
||||
"mni": "Manipuri dili",
|
||||
"glv": "Manx (Galler)",
|
||||
"mri": "Maori Dili",
|
||||
"arn": "Mapudungun",
|
||||
"mar": "Marathi",
|
||||
"chm": "Mari (Rusya)",
|
||||
"mah": "Marshall Dili",
|
||||
"mwr": "Marwari",
|
||||
"mas": "Masai",
|
||||
"men": "Mende (Sierra Leone)",
|
||||
"mic": "Mi'kmak",
|
||||
"min": "Minangkabau",
|
||||
"mwl": "Mirandese",
|
||||
"moh": "Mohawk",
|
||||
"mdf": "Moşka",
|
||||
"lol": "Mongo",
|
||||
"mon": "Moğol Dili",
|
||||
"mos": "Mossi",
|
||||
"mul": "Çoklu diller",
|
||||
"nqo": "N'Ko",
|
||||
"nau": "Nauru",
|
||||
"nav": "Navajo Dili",
|
||||
"ndo": "Ndonga Dili",
|
||||
"nap": "Neapolitan",
|
||||
"nia": "Nias",
|
||||
"niu": "Niuean",
|
||||
"zxx": "Hiçbir dil içeriği yok",
|
||||
"nog": "Nogai",
|
||||
"nor": "Norveçce",
|
||||
"nob": "Norveççe Bokmal",
|
||||
"nno": "Norveççe Nynorsk",
|
||||
"nym": "Nyamwezi",
|
||||
"nya": "Nyanja",
|
||||
"nyn": "Nyankole",
|
||||
"nyo": "Nyoro",
|
||||
"nzi": "Nzima",
|
||||
"oci": "Oksitanca (1500 sonrası)",
|
||||
"oji": "Ojibwa Dili",
|
||||
"orm": "Oromo Dili",
|
||||
"osa": "Osage",
|
||||
"oss": "Osetya Dili",
|
||||
"pal": "Pehlevi",
|
||||
"pau": "Palauan",
|
||||
"pli": "Pali Dili",
|
||||
"pam": "Pampanga",
|
||||
"pag": "Pangasinan",
|
||||
"pan": "Pencabi Dili",
|
||||
"pap": "Papiamento",
|
||||
"fas": "Farsça",
|
||||
"phn": "Fenikçe",
|
||||
"pon": "Pohnpeian",
|
||||
"pol": "Polonyaca",
|
||||
"por": "Portekizce",
|
||||
"pus": "Pushto",
|
||||
"que": "Quechua",
|
||||
"raj": "Rajasthani",
|
||||
"rap": "Rapanui",
|
||||
"ron": "Rumence",
|
||||
"roh": "Romanca",
|
||||
"rom": "Çingene Dili",
|
||||
"run": "Kirundi",
|
||||
"rus": "Rusça",
|
||||
"smo": "Samoa Dili",
|
||||
"sad": "Sandawe",
|
||||
"sag": "Sangho",
|
||||
"san": "Sanskritçe",
|
||||
"sat": "Santali dili",
|
||||
"srd": "Sardinya",
|
||||
"sas": "Sasak",
|
||||
"sco": "İskoç lehçesi",
|
||||
"sel": "Selkup",
|
||||
"srp": "Sırpça",
|
||||
"srr": "Serer",
|
||||
"shn": "Shan",
|
||||
"sna": "Shona",
|
||||
"scn": "Sicilyalı",
|
||||
"sid": "Sidamo",
|
||||
"bla": "Siksika (Kuzey Amerika yerlileri)",
|
||||
"snd": "Sindhi",
|
||||
"sin": "Sinhala Dili",
|
||||
"den": "Slave (Athapascan; Kuzey Amerika yerlileri)",
|
||||
"slk": "Slovakça",
|
||||
"slv": "Slovence",
|
||||
"sog": "Sogdian",
|
||||
"som": "Somali Dili",
|
||||
"snk": "Soninke",
|
||||
"spa": "İspanyolca",
|
||||
"srn": "Sranan Tongo",
|
||||
"suk": "Sukuma",
|
||||
"sux": "Sümerce",
|
||||
"sun": "Sudan Dili",
|
||||
"sus": "Susu",
|
||||
"swa": "Swahili (makro dil)",
|
||||
"ssw": "Siswati",
|
||||
"swe": "İsveçce",
|
||||
"syr": "Süryanice",
|
||||
"tgl": "Tagalog",
|
||||
"tah": "Tahitice",
|
||||
"tgk": "Tacikçe",
|
||||
"tmh": "Tamashek",
|
||||
"tam": "Tamilce",
|
||||
"tat": "Tatarca",
|
||||
"tel": "Telugu",
|
||||
"ter": "Tereno",
|
||||
"tet": "Tetum",
|
||||
"tha": "Taylandça",
|
||||
"bod": "Tibetçe",
|
||||
"tig": "Tigre",
|
||||
"tir": "Tigrinya Dili",
|
||||
"tem": "Timne",
|
||||
"tiv": "Tiv",
|
||||
"tli": "Tlingit",
|
||||
"tpi": "Tok Pisin",
|
||||
"tkl": "Tokelau",
|
||||
"tog": "Tonga (Nyasa)",
|
||||
"ton": "Tonga",
|
||||
"tsi": "Tsimshian",
|
||||
"tso": "Tsonga",
|
||||
"tsn": "Setswana",
|
||||
"tum": "Tumbuka",
|
||||
"tur": "Türkçe",
|
||||
"tuk": "Türkmence",
|
||||
"tvl": "Tuvalu",
|
||||
"tyv": "Tuvinian",
|
||||
"twi": "Twi",
|
||||
"udm": "Udmurt",
|
||||
"uga": "Ugarit Çivi Yazısı",
|
||||
"uig": "Uygurca",
|
||||
"ukr": "Ukraynaca",
|
||||
"umb": "Umbundu",
|
||||
"mis": "Şifresiz diller",
|
||||
"und": "Belirlenemeyen",
|
||||
"urd": "Urduca",
|
||||
"uzb": "Özbekçe",
|
||||
"vai": "Vai",
|
||||
"ven": "Venda Dili",
|
||||
"vie": "Vietnamca",
|
||||
"vol": "Volapük",
|
||||
"vot": "Votic",
|
||||
"wln": "Valonca",
|
||||
"war": "Waray (Filipinler)",
|
||||
"was": "Vasho",
|
||||
"cym": "Gal Dili",
|
||||
"wal": "Wolaytta",
|
||||
"wol": "Wolof",
|
||||
"xho": "Xhosa",
|
||||
"sah": "Yakut",
|
||||
"yao": "Yao",
|
||||
"yap": "Yapese",
|
||||
"yid": "Yidiş",
|
||||
"yor": "Yoruba",
|
||||
"zap": "Zapotec",
|
||||
"zza": "Zaza",
|
||||
"zen": "Zenaga",
|
||||
"zha": "Zuang Dili",
|
||||
"zul": "Zulu",
|
||||
"zun": "Zuni"
|
||||
},
|
||||
"fr": {
|
||||
"aar": "afar",
|
||||
"abk": "abkhaze",
|
||||
@@ -4935,7 +5310,7 @@ LANGUAGE_NAMES = {
|
||||
"pon": "Pohnpeian",
|
||||
"por": "Portuguese",
|
||||
"pro": "Provençal; Old (to 1500)",
|
||||
"pus": "Pushto",
|
||||
"pus": "Pashto",
|
||||
"que": "Quechua",
|
||||
"raj": "Rajasthani",
|
||||
"rap": "Rapanui",
|
||||
@@ -6195,7 +6570,7 @@ LANGUAGE_NAMES = {
|
||||
"pon": "Pohnpeian",
|
||||
"por": "Portuguese",
|
||||
"pro": "Provençal; Old (to 1500)",
|
||||
"pus": "Pushto",
|
||||
"pus": "Pashto",
|
||||
"que": "Quechua",
|
||||
"raj": "Rajasthani",
|
||||
"rap": "Rapanui",
|
||||
@@ -6615,7 +6990,7 @@ LANGUAGE_NAMES = {
|
||||
"pon": "Pohnpeian",
|
||||
"por": "Portuguese",
|
||||
"pro": "Provençal; Old (to 1500)",
|
||||
"pus": "Pushto",
|
||||
"pus": "Pashto",
|
||||
"que": "Quechua",
|
||||
"raj": "Rajasthani",
|
||||
"rap": "Rapanui",
|
||||
|
||||
@@ -42,11 +42,17 @@ def init_app(app, config):
|
||||
app.config['LDAP_SCHEMA'] = 'ldaps'
|
||||
else:
|
||||
app.config['LDAP_SCHEMA'] = 'ldap'
|
||||
# app.config['LDAP_SCHEMA'] = config.config_ldap_schema
|
||||
app.config['LDAP_USERNAME'] = config.config_ldap_serv_username
|
||||
if config.config_ldap_serv_password is None:
|
||||
config.config_ldap_serv_password = ''
|
||||
app.config['LDAP_PASSWORD'] = base64.b64decode(config.config_ldap_serv_password)
|
||||
if config.config_ldap_authentication > constants.LDAP_AUTH_ANONYMOUS:
|
||||
if config.config_ldap_authentication > constants.LDAP_AUTH_UNAUTHENTICATE:
|
||||
if config.config_ldap_serv_password is None:
|
||||
config.config_ldap_serv_password = ''
|
||||
app.config['LDAP_PASSWORD'] = base64.b64decode(config.config_ldap_serv_password)
|
||||
else:
|
||||
app.config['LDAP_PASSWORD'] = base64.b64decode("")
|
||||
app.config['LDAP_USERNAME'] = config.config_ldap_serv_username
|
||||
else:
|
||||
app.config['LDAP_USERNAME'] = ""
|
||||
app.config['LDAP_PASSWORD'] = base64.b64decode("")
|
||||
if bool(config.config_ldap_cert_path):
|
||||
app.config['LDAP_REQUIRE_CERT'] = True
|
||||
app.config['LDAP_CERT_PATH'] = config.config_ldap_cert_path
|
||||
@@ -90,7 +96,7 @@ def bind_user(username, password):
|
||||
log.debug("LDAP login '%s': %r", username, result)
|
||||
return result is not None, None
|
||||
return None, None # User not found
|
||||
except (TypeError, AttributeError) as ex:
|
||||
except (TypeError, AttributeError, KeyError) as ex:
|
||||
error = ("LDAP bind_user: %s" % ex)
|
||||
return None, error
|
||||
except LDAPException as ex:
|
||||
|
||||
@@ -73,9 +73,9 @@ $(function () {
|
||||
if (showFlag === 1) {
|
||||
$("#meta-info").html("<ul id=\"book-list\" class=\"media-list\"></ul>");
|
||||
}
|
||||
if ((ggDone == 3 || (ggDone == 1 && ggResults.length === 0)) &&
|
||||
(dbDone == 3 || (ggDone == 1 && dbResults.length === 0)) &&
|
||||
(cvDone == 3 || (ggDone == 1 && cvResults.length === 0))) {
|
||||
if ((ggDone === 3 || (ggDone === 1 && ggResults.length === 0)) &&
|
||||
(dbDone === 3 || (ggDone === 1 && dbResults.length === 0)) &&
|
||||
(cvDone === 3 || (ggDone === 1 && cvResults.length === 0))) {
|
||||
$("#meta-info").html("<p class=\"text-danger\">" + msg.no_result + "</p>");
|
||||
return;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ $(function () {
|
||||
var dateFomers = "";
|
||||
if (result.store_date) {
|
||||
dateFomers = result.store_date.split("-");
|
||||
}else{
|
||||
} else {
|
||||
dateFomers = result.date_added.split("-");
|
||||
}
|
||||
var publishedYear = parseInt(dateFomers[0]);
|
||||
@@ -202,12 +202,12 @@ $(function () {
|
||||
|
||||
var book = {
|
||||
id: result.id,
|
||||
title: seriesTitle + ' #' +('00' + result.issue_number).slice(-3) + ' - ' + result.name,
|
||||
title: seriesTitle + " #" + ("00" + result.issue_number).slice(-3) + " - " + result.name,
|
||||
authors: result.author || [],
|
||||
description: result.description,
|
||||
publisher: "",
|
||||
publishedDate: publishedDate || "",
|
||||
tags: ['Comics', seriesTitle],
|
||||
tags: ["Comics", seriesTitle],
|
||||
rating: 0,
|
||||
series: seriesTitle || "",
|
||||
cover: result.image.original_url,
|
||||
|
||||
@@ -211,8 +211,7 @@ $(function() {
|
||||
data: {"parameter":2},
|
||||
success: function success(data) {
|
||||
$("#spinner2").hide();
|
||||
ResultText = data.text;
|
||||
$("#DialogContent").html(ResultText);
|
||||
$("#DialogContent").html(data.text);
|
||||
$("#DialogFinished").removeClass("hidden");
|
||||
}
|
||||
});
|
||||
@@ -298,7 +297,7 @@ $(function() {
|
||||
$(".discover .row").isotope("layout");
|
||||
});
|
||||
|
||||
$('#import_ldap_users').click(function() {
|
||||
$("#import_ldap_users").click(function() {
|
||||
$("#DialogHeader").addClass("hidden");
|
||||
$("#DialogFinished").addClass("hidden");
|
||||
$("#DialogContent").html("");
|
||||
@@ -311,8 +310,7 @@ $(function() {
|
||||
url: path + "/../../import_ldap_users",
|
||||
success: function success(data) {
|
||||
$("#spinner2").hide();
|
||||
ResultText = data.text;
|
||||
$("#DialogContent").html(ResultText);
|
||||
$("#DialogContent").html(data.text);
|
||||
$("#DialogFinished").removeClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -149,12 +149,10 @@ $(function() {
|
||||
$.ajax({
|
||||
url: path + "/../../ajax/editrestriction/" + type,
|
||||
type: "Post",
|
||||
data: row //$(this).closest("form").serialize() + "&" + $(this)[0].name + "=",
|
||||
data: row
|
||||
});
|
||||
});
|
||||
$("[id^=submit_]").click(function(event) {
|
||||
// event.stopPropagation();
|
||||
// event.preventDefault();
|
||||
$(this)[0].blur();
|
||||
$.ajax({
|
||||
url: path + "/../../ajax/addrestriction/" + type,
|
||||
|
||||
@@ -233,7 +233,6 @@
|
||||
<input type="number" min="1" max="65535" class="form-control" id="config_ldap_port" name="config_ldap_port" value="{% if config.config_ldap_port != None %}{{ config.config_ldap_port }}{% endif %}" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="config_ldap_encryption">{{_('LDAP Encryption')}}</label>
|
||||
<label for="config_ldap_encryption">{{_('LDAP Encryption')}}</label>
|
||||
<select name="config_ldap_encryption" id="config_ldap_encryption" class="form-control" data-controlall="ldap-cert-settings">
|
||||
<option value="0" {% if config.config_ldap_encryption == 0 %}selected{% endif %}>{{ _('None') }}</option>
|
||||
@@ -247,14 +246,25 @@
|
||||
<input type="text" class="form-control" id="config_ldap_cert_path" name="config_ldap_cert_path" value="{% if config.config_ldap_cert_path != None %}{{ config.config_ldap_cert_path }}{% endif %}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_ldap_serv_username">{{_('LDAP Administrator Username')}}</label>
|
||||
<input type="text" class="form-control" id="config_ldap_serv_username" name="config_ldap_serv_username" value="{% if config.config_ldap_serv_username != None %}{{ config.config_ldap_serv_username }}{% endif %}" autocomplete="off">
|
||||
<label for="config_ldap_authentication">{{_('LDAP Authentication')}}</label>
|
||||
<select name="config_ldap_authentication" id="config_ldap_authentication" class="form-control" data-control="ldap-auth-password" data-controlall="ldap-auth-settings">
|
||||
<option value="0" {% if config.config_ldap_authentication == 0 %}selected{% endif %}>{{ _('Anonymous') }}</option>
|
||||
<option value="1" {% if config.config_ldap_authentication == 1 %}selected{% endif %}>{{ _('Unauthenticated') }}</option>
|
||||
<option value="2" {% if config.config_ldap_authentication == 2 %}selected{% endif %}>{{ _('Simple') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="config_ldap_serv_password">{{_('LDAP Administrator Password')}}</label>
|
||||
<input type="password" class="form-control" id="config_ldap_serv_password" name="config_ldap_serv_password" value="" autocomplete="off">
|
||||
<div data-related="ldap-auth-settings">
|
||||
<div class="form-group">
|
||||
<label for="config_ldap_serv_username">{{_('LDAP Administrator Username')}}</label>
|
||||
<input type="text" class="form-control" id="config_ldap_serv_username" name="config_ldap_serv_username" value="{% if config.config_ldap_serv_username != None %}{{ config.config_ldap_serv_username }}{% endif %}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div data-related="ldap-auth-password-2">
|
||||
<div class="form-group">
|
||||
<label for="config_ldap_serv_password">{{_('LDAP Administrator Password')}}</label>
|
||||
<input type="password" class="form-control" id="config_ldap_serv_password" name="config_ldap_serv_password" value="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="config_ldap_dn">{{_('LDAP Distinguished Name (DN)')}}</label>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="Show_detail_random" id="Show_detail_random" {% if content.show_detail_random() %}checked{% endif %}>
|
||||
<label for="Show_detail_random">{{_('Show Random Books')}}</label>
|
||||
<label for="Show_detail_random">{{_('Show Random Books in Detail View')}}</label>
|
||||
</div>
|
||||
{% if ( g.user and g.user.role_admin() and not new_user ) %}
|
||||
<a href="#" id="get_user_tags" class="btn btn-default" data-toggle="modal" data-target="#restrictModal">{{_('Add Allowed/Denied Tags')}}</a>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -156,6 +156,9 @@ def load_user_from_auth_header(header_val):
|
||||
except (TypeError, UnicodeDecodeError, binascii.Error):
|
||||
pass
|
||||
user = _fetch_user_by_name(basic_username)
|
||||
if config.config_login_type == constants.LOGIN_LDAP and services.ldap:
|
||||
if services.ldap.bind_user(str(user.password), basic_password):
|
||||
return user
|
||||
if user and check_password_hash(str(user.password), basic_password):
|
||||
return user
|
||||
return
|
||||
@@ -285,7 +288,7 @@ def import_ldap_users():
|
||||
showtext = {}
|
||||
try:
|
||||
new_users = services.ldap.get_group_members(config.config_ldap_group_name)
|
||||
except (services.ldap.LDAPException, TypeError, AttributeError) as e:
|
||||
except (services.ldap.LDAPException, TypeError, AttributeError, KeyError) as e:
|
||||
log.debug(e)
|
||||
showtext['text'] = _(u'Error: %(ldaperror)s', ldaperror=e)
|
||||
return json.dumps(showtext)
|
||||
|
||||
Reference in New Issue
Block a user