Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Handling of members with different classifications #78

Closed
astrochun opened this issue Oct 7, 2020 · 1 comment · Fixed by #79
Closed

Bug: Handling of members with different classifications #78

astrochun opened this issue Oct 7, 2020 · 1 comment · Fixed by #79
Assignees
Labels
bug Something isn't working scripts Script development
Milestone

Comments

@astrochun
Copy link
Contributor

Describe the bug (REQUIRED)
The quota.ual_ldap_quota_query ldap3 query strings will return faculty, grad and ugrad members. However, there is overlaps between these groups (e.g., a grad member can also be staff). To fix this issue, it's best to mutually exclusive with the highest rank determining the quota level.

Version information (please complete the following, default in brackets): (REQUIRED)

  • ReQUIAM version: 0.12.2`
  • ReQUIAM branch info: feature/limited_set

Reproduction Steps (REQUIRED)

from requiam import quota                                                                                                                
from requiam import ldap_query                                                                                                           

# Get query string
grad = quota.ual_ldap_quota_query('grad')
faculty = quota.ual_ldap_quota_query('faculty') 
ugrad = quota.ual_ldap_quota_query('ugrad')

ldc = ldap_query.LDAPConnection(ldap_host='eds.iam.arizona.edu',
                                ldap_base_dn='dc=eds,dc=arizona,dc=edu',
                                ldap_user='**override**', ldap_password='**override**')

# Query for members
faculty_uaid = ldap_query.ldap_search(ldc, faculty)                                                                                      
grad_uaid = ldap_query.ldap_search(ldc, grad)
ugrad_uaid = ldap_query.ldap_search(ldc, ugrad)

# Info
In [10]: len(faculty_uaid)                                                                                                                       
Out[10]: 23558

In [11]: len(grad_uaid)                                                                                                                          
Out[11]: 15450

In [19]: len(ugrad_uaid)                                                                                                                         
Out[19]: 46777

In [13]: len(faculty_uaid & grad_uaid)                                                                                                                            
Out[13]: 860

In [17]: len(faculty_uaid & ugrad_uaid)                                                                                                              
Out[17]: 435

In [18]: len(grad_uaid & ugrad_uaid)                                                                                                             
Out[18]: 4217

Expected behavior (Optional)
Exclusive list for grad and ugrad

@astrochun astrochun added the bug Something isn't working label Oct 7, 2020
@astrochun astrochun self-assigned this Oct 7, 2020
@astrochun astrochun added the scripts Script development label Oct 7, 2020
@astrochun astrochun added this to To do in ReDATA Patron Management Software via automation Oct 7, 2020
@astrochun astrochun moved this from To do to In progress in ReDATA Patron Management Software Oct 7, 2020
@astrochun astrochun added this to the v0.13.0 milestone Oct 7, 2020
@astrochun
Copy link
Contributor Author

Note: Testing with faculty, grad, and ugrad demonstrated complete exclusion so that grad is a clean list not including faculty and ugrad does not include grad and faculty

@astrochun astrochun moved this from In progress to Ready to merge with release in ReDATA Patron Management Software Oct 7, 2020
This was referenced Oct 7, 2020
ReDATA Patron Management Software automation moved this from Ready to merge with release to Done Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scripts Script development
Development

Successfully merging a pull request may close this issue.

1 participant