Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
supr-ldap-integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Swestore
supr-ldap-integration
Commits
361c6de3
Commit
361c6de3
authored
2 years ago
by
Krishnaveni
Browse files
Options
Downloads
Patches
Plain Diff
added code to change str to bytes in createPersonAttrs to be compatible with Python3
parent
cd8e3f5d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modified_time.txt
+1
-1
1 addition, 1 deletion
modified_time.txt
requirements.txt
+0
-2
0 additions, 2 deletions
requirements.txt
supr_ldap_krb.py
+4
-2
4 additions, 2 deletions
supr_ldap_krb.py
with
5 additions
and
5 deletions
modified_time.txt
+
1
−
1
View file @
361c6de3
2023-08-22 18:51:26
2023-08-23 14:20:17
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
requirements.txt
deleted
100644 → 0
+
0
−
2
View file @
cd8e3f5d
python-ldap
requests
This diff is collapsed.
Click to expand it.
supr_ldap_krb.py
+
4
−
2
View file @
361c6de3
...
@@ -24,7 +24,7 @@ class SUPR_LDAP:
...
@@ -24,7 +24,7 @@ class SUPR_LDAP:
if
all_projects
or
persons_modified
:
if
all_projects
or
persons_modified
:
# Get Logging File Handler
# Get Logging File Handler
self
.
logger
=
setup_log
(
self
.
__class__
.
__name__
,
"
ldap
"
)
self
.
logger
=
setup_log
(
self
.
__class__
.
__name__
,
settings
.
LOG_FILE
)
# LDAP connection
# LDAP connection
self
.
l
=
None
# TODO: Give this variable a better name
self
.
l
=
None
# TODO: Give this variable a better name
...
@@ -283,6 +283,8 @@ class SUPR_LDAP:
...
@@ -283,6 +283,8 @@ class SUPR_LDAP:
else
:
else
:
attrsPerson
[
'
uid
'
]
=
self
.
getUID
(
m
)
attrsPerson
[
'
uid
'
]
=
self
.
getUID
(
m
)
attrsPerson
=
{
key
:[
v
.
encode
(
"
utf-8
"
)
if
type
(
v
)
==
str
else
v
for
v
in
values
]
for
key
,
values
in
attrsPerson
.
items
()}
return
attrsPerson
return
attrsPerson
def
personChanged
(
self
,
result_data
,
attrsPerson
):
def
personChanged
(
self
,
result_data
,
attrsPerson
):
...
@@ -487,7 +489,7 @@ class SUPR_LDAP:
...
@@ -487,7 +489,7 @@ class SUPR_LDAP:
attrsPerson
=
self
.
createPersonAttrs
(
m
,
uidNumber
)
attrsPerson
=
self
.
createPersonAttrs
(
m
,
uidNumber
)
personDN
=
"
uid=
"
+
attrsPerson
[
'
uid
'
]
+
"
,
"
+
settings
.
peopleDN
personDN
=
"
uid=
"
+
str
(
attrsPerson
[
'
uid
'
]
)
+
"
,
"
+
settings
.
peopleDN
if
(
result_data
and
self
.
personChanged
(
result_data
,
attrsPerson
)):
if
(
result_data
and
self
.
personChanged
(
result_data
,
attrsPerson
)):
self
.
l
.
delete_s
(
personDN
)
self
.
l
.
delete_s
(
personDN
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment