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
4 years ago
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):
return
reboot_required
,
_configuration_result
(
_
(
'LDAP User Object Filter Has Unmatched Parenthesis'
),
gdriveError
)
if
config
.
config_ldap_cacert_path
and
not
(
os
.
path
.
isfile
(
config
.
config_ldap_cacert_path
)
or
os
.
path
.
isfile
(
config
.
config_ldap_cacert_path
)
or
os
.
path
.
isfile
(
config
.
config_ldap_key_path
)):
return
reboot_required
,
\
_configuration_result
(
_
(
'LDAP CACertificate, Certificate or Key Location is not Valid, Please Enter Correct Path'
),
gdriveError
)
if
config
.
config_ldap_cacert_path
or
config
.
config_ldap_cert_path
or
config
.
config_ldap_key_path
:
if
not
(
os
.
path
.
isfile
(
config
.
config_ldap_cacert_path
)
and
os
.
path
.
isfile
(
config
.
config_ldap_cert_path
)
and
os
.
path
.
isfile
(
config
.
config_ldap_key_path
)):
return
reboot_required
,
\
_configuration_result
(
_
(
'LDAP CACertificate, Certificate or Key Location is not Valid, Please Enter Correct Path'
),
gdriveError
)
return
reboot_required
,
None
...
...
This diff is collapsed.
Click to expand it.
cps/services/simpleldap.py
View file @
f620d4a9
...
...
@@ -38,7 +38,7 @@ def init_app(app, config):
app
.
config
[
'LDAP_HOST'
]
=
config
.
config_ldap_provider_url
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
:
app
.
config
[
'LDAP_SCHEMA'
]
=
'ldaps'
else
:
...
...
This diff is collapsed.
Click to expand it.
cps/templates/config_edit.html
View file @
f620d4a9
...
...
@@ -264,21 +264,21 @@
</select>
</div>
<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"
>
<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"
>
<button
type=
"button"
id=
"library_path"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-folder-open"
></span></button>
</span>
</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"
>
<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"
>
<button
type=
"button"
id=
"library_path"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-folder-open"
></span></button>
</span>
</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"
>
<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"
>
...
...
This diff is collapsed.
Click to expand it.
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
#: cps/templates/http_error.html:38
msgid "Create Issue"
msgstr "Issue erzeuge"
msgstr "Issue erzeuge
n
"
#: cps/templates/http_error.html:45
msgid "Return to Home"
...
...
This diff is collapsed.
Click to expand it.
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