FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lookup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Information Services
DevOps
Django Libraries
Lookup
Commits
50ce1a9f
Commit
50ce1a9f
authored
9 years ago
by
Dr Abraham Martin
Browse files
Options
Downloads
Patches
Plain Diff
Return empty LookupGroup list if IbisException
parent
c5b5e16a
No related branches found
Branches containing commit
Tags
1.6.1
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG
+6
-0
6 additions, 0 deletions
CHANGELOG
debian/changelog
+6
-0
6 additions, 0 deletions
debian/changelog
debian/control
+2
-2
2 additions, 2 deletions
debian/control
setup.py
+1
-1
1 addition, 1 deletion
setup.py
ucamlookup/utils.py
+10
-5
10 additions, 5 deletions
ucamlookup/utils.py
with
25 additions
and
8 deletions
CHANGELOG
+
6
−
0
View file @
50ce1a9f
django-ucamlookup changelog
django-ucamlookup changelog
=============================
=============================
1.6.1 - 09/10/2015
------------------
- Return empty LookupGroup list if IbisException
1.6 - 09/10/2015
1.6 - 09/10/2015
------------------
------------------
...
...
This diff is collapsed.
Click to expand it.
debian/changelog
+
6
−
0
View file @
50ce1a9f
django-ucamlookup (1.6.1) unstable; urgency=high
* Return empty LookupGroup list if IbisException
-- Abraham Martin <amc203@cam.ac.uk> Fri, 9 Oct 2015 11:58:39 +0100
django-ucamlookup (1.6) unstable; urgency=high
django-ucamlookup (1.6) unstable; urgency=high
* Dropped support for django 1.6 (no longer supported by django project)
* Dropped support for django 1.6 (no longer supported by django project)
...
...
This diff is collapsed.
Click to expand it.
debian/control
+
2
−
2
View file @
50ce1a9f
...
@@ -5,12 +5,12 @@ Uploaders: Abraham Martin <amc203@cam.ac.uk>,
...
@@ -5,12 +5,12 @@ Uploaders: Abraham Martin <amc203@cam.ac.uk>,
Section: python
Section: python
Priority: optional
Priority: optional
Build-Depends: python-setuptools, python-all (>= 2.6.6-3), debhelper (>=9),
Build-Depends: python-setuptools, python-all (>= 2.6.6-3), debhelper (>=9),
python-django (>=1.
6
), python-markdown, dh-python
python-django (>=1.
7
), python-markdown, dh-python
Standards-Version: 3.9.4
Standards-Version: 3.9.4
Package: python-django-ucamlookup
Package: python-django-ucamlookup
Architecture: all
Architecture: all
Depends: python-django (>=1.
6
), python-requests, python-openssl, ${misc:Depends}, ${python:Depends}
Depends: python-django (>=1.
7
), python-requests, python-openssl, ${misc:Depends}, ${python:Depends}
Description: University of Cambridge Web Authentication module for Django
Description: University of Cambridge Web Authentication module for Django
This package provides a django authentication back-end to the
This package provides a django authentication back-end to the
University of Cambridge Web Authentication system.
University of Cambridge Web Authentication system.
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
50ce1a9f
...
@@ -8,7 +8,7 @@ setup(
...
@@ -8,7 +8,7 @@ setup(
description
=
'
A Django module for the University of Cambridge Lookup service
'
,
description
=
'
A Django module for the University of Cambridge Lookup service
'
,
long_description
=
open
(
'
README.rst
'
).
read
(),
long_description
=
open
(
'
README.rst
'
).
read
(),
url
=
'
https://git.csx.cam.ac.uk/x/ucs/u/amc203/django-ucamlookup.git
'
,
url
=
'
https://git.csx.cam.ac.uk/x/ucs/u/amc203/django-ucamlookup.git
'
,
version
=
'
1.6
'
,
version
=
'
1.6
.1
'
,
license
=
'
MIT
'
,
license
=
'
MIT
'
,
author
=
'
Information Systems Group, University Information Services, University of Cambridge
'
,
author
=
'
Information Systems Group, University Information Services, University of Cambridge
'
,
author_email
=
'
information-systems@ucs.cam.ac.uk
'
,
author_email
=
'
information-systems@ucs.cam.ac.uk
'
,
...
...
This diff is collapsed.
Click to expand it.
ucamlookup/utils.py
+
10
−
5
View file @
50ce1a9f
...
@@ -46,9 +46,11 @@ def get_group_ids_of_a_user_in_lookup(user):
...
@@ -46,9 +46,11 @@ def get_group_ids_of_a_user_in_lookup(user):
:param user: the user
:param user: the user
:return: the list of group_ids
:return: the list of group_ids
"""
"""
try
:
group_list
=
PersonMethods
(
conn
).
getGroups
(
scheme
=
"
crsid
"
,
identifier
=
user
.
username
)
group_list
=
PersonMethods
(
conn
).
getGroups
(
scheme
=
"
crsid
"
,
identifier
=
user
.
username
)
return
map
(
lambda
group
:
group
.
groupid
,
group_list
)
return
map
(
lambda
group
:
group
.
groupid
,
group_list
)
except
IbisException
:
return
[]
def
get_or_create_group_by_groupid
(
groupid
):
def
get_or_create_group_by_groupid
(
groupid
):
...
@@ -69,8 +71,11 @@ def get_user_lookupgroups(user):
...
@@ -69,8 +71,11 @@ def get_user_lookupgroups(user):
:param user: the User
:param user: the User
:return: the list of LookupGroups
:return: the list of LookupGroups
"""
"""
group_list
=
PersonMethods
(
conn
).
getGroups
(
scheme
=
"
crsid
"
,
identifier
=
user
.
username
)
try
:
return
map
(
lambda
group
:
get_or_create_group_by_groupid
(
group
.
groupid
),
group_list
)
group_list
=
PersonMethods
(
conn
).
getGroups
(
scheme
=
"
crsid
"
,
identifier
=
user
.
username
)
return
map
(
lambda
group
:
get_or_create_group_by_groupid
(
group
.
groupid
),
group_list
)
except
IbisException
:
return
[]
def
get_institutions
(
user
=
None
):
def
get_institutions
(
user
=
None
):
...
...
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