Skip to content

Commit 7eb779c

Browse files
Merge branch 'AP-361-contingents' into 'master'
Skip users with contingent job codes See merge request lap/alma-user-load!51
2 parents 82aeae1 + 44f63fb commit 7eb779c

7 files changed

Lines changed: 548 additions & 1 deletion

File tree

config/ldap_fields.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ Attributes:
2828
Student Affiliation:
2929
- "STUDENT-TYPE-REGISTERED"
3030
- "STUDENT-TYPE-NOT REGISTERED"
31+
- "FORMER-STUDENT-IN-GRACE"

config/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Settings:
66
upload_host: "upload.lib.berkeley.edu"
77
upload_user: "ssullivan"
88
last_alma_purge: "2023-06-30"
9-
application_version: "1.5.8"
9+
application_version: "1.5.9"
1010

1111
# TODO - flesh this out
1212
# http://docopt.org/

config/ucpath_codes.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ Emeritus Job Code:
5858
- "003800"
5959
- "009902"
6060

61+
Contingent Worker Job Code:
62+
- "CWR005"
63+
- "CWR006"
64+
- "CWR011"
65+
- "CWR017"
66+
6167
Library Staff Dept Code Prefix:
6268
- "KPADM"
6369
- "KSBAN"

lib/ucpath/user.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ def create_user_record
140140
end
141141
end
142142

143+
# CONTINGENT WORKER CHECK
144+
# AP-361: Thou Shalt not pass if the user has a Contingent Worker Job Code!
145+
job_code = jobs.job.job_code || nil
146+
if job_code && Config.check_ucpath_code('Contingent Worker Job Code', job_code)
147+
logger.info "#{id} - Ineligible: Contingent Worker Job Code: #{job_code}"
148+
return nil
149+
end
150+
143151
# NAMES
144152
# Get first_name, middle_name, last_name from the primary UCPath Employee record
145153
# If the UCPath lacks first_name and last_name, use LDAP record

0 commit comments

Comments
 (0)