Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
f620d4a9
Commit
f620d4a9
authored
Nov 22, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix LDAP errors
parent
fb1e763b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
admin.py
cps/admin.py
+7
-6
simpleldap.py
cps/services/simpleldap.py
+1
-1
config_edit.html
cps/templates/config_edit.html
+3
-3
messages.po
cps/translations/de/LC_MESSAGES/messages.po
+1
-1
No files found.
cps/admin.py
View file @
f620d4a9
...
@@ -614,12 +614,13 @@ def _configuration_ldap_helper(to_save, gdriveError):
...
@@ -614,12 +614,13 @@ def _configuration_ldap_helper(to_save, gdriveError):
return
reboot_required
,
_configuration_result
(
_
(
'LDAP User Object Filter Has Unmatched Parenthesis'
),
return
reboot_required
,
_configuration_result
(
_
(
'LDAP User Object Filter Has Unmatched Parenthesis'
),
gdriveError
)
gdriveError
)
if
config
.
config_ldap_cacert_path
and
not
(
os
.
path
.
isfile
(
config
.
config_ldap_cacert_path
)
if
config
.
config_ldap_cacert_path
or
config
.
config_ldap_cert_path
or
config
.
config_ldap_key_path
:
or
os
.
path
.
isfile
(
config
.
config_ldap_cacert_path
)
if
not
(
os
.
path
.
isfile
(
config
.
config_ldap_cacert_path
)
and
or
os
.
path
.
isfile
(
config
.
config_ldap_key_path
)):
os
.
path
.
isfile
(
config
.
config_ldap_cert_path
)
and
return
reboot_required
,
\
os
.
path
.
isfile
(
config
.
config_ldap_key_path
)):
_configuration_result
(
_
(
'LDAP CACertificate, Certificate or Key Location is not Valid, Please Enter Correct Path'
),
return
reboot_required
,
\
gdriveError
)
_configuration_result
(
_
(
'LDAP CACertificate, Certificate or Key Location is not Valid, Please Enter Correct Path'
),
gdriveError
)
return
reboot_required
,
None
return
reboot_required
,
None
...
...
cps/services/simpleldap.py
View file @
f620d4a9
...
@@ -38,7 +38,7 @@ def init_app(app, config):
...
@@ -38,7 +38,7 @@ def init_app(app, config):
app
.
config
[
'LDAP_HOST'
]
=
config
.
config_ldap_provider_url
app
.
config
[
'LDAP_HOST'
]
=
config
.
config_ldap_provider_url
app
.
config
[
'LDAP_PORT'
]
=
config
.
config_ldap_port
app
.
config
[
'LDAP_PORT'
]
=
config
.
config_ldap_port
app
.
config
[
'LDAP_CUSTOM_OPTIONS'
]
=
{
pyLDAP
.
OPT_REFERRALS
,
0
}
app
.
config
[
'LDAP_CUSTOM_OPTIONS'
]
=
{
pyLDAP
.
OPT_REFERRALS
:
0
}
if
config
.
config_ldap_encryption
==
2
:
if
config
.
config_ldap_encryption
==
2
:
app
.
config
[
'LDAP_SCHEMA'
]
=
'ldaps'
app
.
config
[
'LDAP_SCHEMA'
]
=
'ldaps'
else
:
else
:
...
...
cps/templates/config_edit.html
View file @
f620d4a9
...
@@ -264,21 +264,21 @@
...
@@ -264,21 +264,21 @@
</select>
</select>
</div>
</div>
<div
data-related=
"ldap-cert-settings"
>
<div
data-related=
"ldap-cert-settings"
>
<label
for=
"config_ldap_cacert_path"
>
{{_('LDAP CACertificate Path')}}
</label>
<label
for=
"config_ldap_cacert_path"
>
{{_('LDAP CACertificate Path
(Only needed for Client Certificate Authentication)
')}}
</label>
<div
class=
"form-group input-group"
>
<div
class=
"form-group input-group"
>
<input
type=
"text"
class=
"form-control"
id=
"config_ldap_cacert_path"
name=
"config_ldap_cacert_path"
value=
"{% if config.config_ldap_cacert_path != None %}{{ config.config_ldap_cacert_path }}{% endif %}"
autocomplete=
"off"
>
<input
type=
"text"
class=
"form-control"
id=
"config_ldap_cacert_path"
name=
"config_ldap_cacert_path"
value=
"{% if config.config_ldap_cacert_path != None %}{{ config.config_ldap_cacert_path }}{% endif %}"
autocomplete=
"off"
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
id=
"library_path"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-folder-open"
></span></button>
<button
type=
"button"
id=
"library_path"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-folder-open"
></span></button>
</span>
</span>
</div>
</div>
<label
for=
"config_ldap_cert_path"
>
{{_('LDAP Certificate Path')}}
</label>
<label
for=
"config_ldap_cert_path"
>
{{_('LDAP Certificate Path
(Only needed for Client Certificate Authentication)
')}}
</label>
<div
class=
"form-group input-group"
>
<div
class=
"form-group input-group"
>
<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"
>
<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"
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
id=
"library_path"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-folder-open"
></span></button>
<button
type=
"button"
id=
"library_path"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-folder-open"
></span></button>
</span>
</span>
</div>
</div>
<label
for=
"config_ldap_key_path"
>
{{_('LDAP Keyfile Path')}}
</label>
<label
for=
"config_ldap_key_path"
>
{{_('LDAP Keyfile Path
(Only needed for Client Certificate Authentication)
')}}
</label>
<div
class=
"form-group input-group"
>
<div
class=
"form-group input-group"
>
<input
type=
"text"
class=
"form-control"
id=
"config_ldap_key_path"
name=
"config_ldap_key_path"
value=
"{% if config.config_ldap_key_path != None %}{{ config.config_ldap_key_path }}{% endif %}"
autocomplete=
"off"
>
<input
type=
"text"
class=
"form-control"
id=
"config_ldap_key_path"
name=
"config_ldap_key_path"
value=
"{% if config.config_ldap_key_path != None %}{{ config.config_ldap_key_path }}{% endif %}"
autocomplete=
"off"
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
...
...
cps/translations/de/LC_MESSAGES/messages.po
View file @
f620d4a9
...
@@ -2122,7 +2122,7 @@ msgstr "Öffne ddie .kobo/Kobo eReader.conf Datei in einem Texteditor und füge
...
@@ -2122,7 +2122,7 @@ msgstr "Öffne ddie .kobo/Kobo eReader.conf Datei in einem Texteditor und füge
#: cps/templates/http_error.html:38
#: cps/templates/http_error.html:38
msgid "Create Issue"
msgid "Create Issue"
msgstr "Issue erzeuge"
msgstr "Issue erzeuge
n
"
#: cps/templates/http_error.html:45
#: cps/templates/http_error.html:45
msgid "Return to Home"
msgid "Return to Home"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment