Created
August 8, 2019 16:12
-
-
Save aelkiss/a53ab27c08fbeb83e35da3dc4da77580 to your computer and use it in GitHub Desktop.
create fake user for ht useradmin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'faker' | |
user = { | |
userid: Faker::Internet.username, | |
displayname: Faker::Name.name, | |
email: Faker::Internet.email, | |
activity_contact: Faker::Internet.email, | |
approver: Faker::Internet.email, | |
authorizer: Faker::Internet.email, | |
usertype: ['staff','external','student'].sample, | |
role: ['corrections','cataloging','ssdproxy','crms','quality','staffdeveloper','staffsysadmin','replacement','ssd'].sample, | |
access: ['total','normal'].sample, | |
expires: Faker::Time.forward, | |
expire_type: ['expiresannually','expiresbiannually','expirescustom90','expirescustom60'].sample, | |
iprestrict: Faker::Internet.ip_v4_address, | |
mfa: 0, | |
identity_provider: Faker::Internet.url | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Will need to escape the IP address but other than that this should be pretty good. You could also have a variant that creates an MFA-enabled user (iprestrict = null, mfa=1)