class Ucert::AudiologTracker
Class to handle Audiolog user account IDs
Attributes
audiolog_user[R]
verbose[RW]
Class constant variables
Public Class Methods
new(params ={})
click to toggle source
Instance default variables
# File lib/ucert/audiolog_tracker.rb, line 18 def initialize (params ={}) @verbose=params.fetch(:verbose, false) # Audiolog users are defined by assigning AD user into a container under CMBNY domain controller # Refer to the screenshot for further details # # # Define the Audiolog AD group instance variable @audiolog_class={"CN=Group Audiolog,CN=Users,DC=ny,DC=cmbchina,DC=com"=>true} # Load the Audiolog host machine instance variable @audiolog_host={"CN=3K103531,OU=Computers,OU=SystemManagement,DC=ny,DC=cmbchina,DC=com"=>true} # AudioLog users are configured directly in the application; there is no user report that could # be exported by the application GUI; so that we have to hard code it as below: @audiolog_user={1=>{"type"=>"local", "uid"=>"Admin", "desc"=>"Application Administrator", "dn"=>nil}, 2=>{"type"=>"local", "uid"=>"Archivist", "desc"=>"Archive Operator", "dn"=>nil}, 3=>{"type"=>"domain", "uid"=>"ChenZhon108", "desc"=>"Zhong Chen", "dn"=>"CN=Zhong Chen,OU=Disabled Users,OU=New York Branch,DC=ny,DC=cmbchina,DC=com"}, 4=>{"type"=>"domain", "uid"=>"chincm136", "desc"=>"Carmen Chin", "dn"=>"CN=Carmen Chin,OU=Users,OU=Compliance,OU=New York Branch,DC=ny,DC=cmbchina,DC=com"}, 5=>{"type"=>"domain", "uid"=>"FeiWang", "desc"=>"Fei Wang", "dn"=>"CN=Fei Wang,OU=Users,OU=Compliance,OU=New York Branch,DC=ny,DC=cmbchina,DC=com"}, 6=>{"type"=>"domain", "uid"=>"FrieKei804", "desc"=>"Keith Friedland", "dn"=>"CN=Keith Friedland,OU=Users,OU=Compliance,OU=New York Branch,DC=ny,DC=cmbchina,DC=com"}, 7=>{"type"=>"domain", "uid"=>"LianDuan", "desc"=>"Lian Duan", "dn"=>" CN=Lian Duan,OU=Users,OU=Compliance,OU=New York Branch,DC=ny,DC=cmbchina,DC=com"}, 8=>{"type"=>"local", "uid"=>"Engineer", "desc"=>"Application Configuration User", "dn"=>nil}, 9=>{"type"=>"local", "uid"=>"playback", "desc"=>"Playback user", "dn"=>nil}, 10=>{"type"=>"local", "uid"=>"Power", "desc"=>"Application Power User", "dn"=>nil}, 11=>{"type"=>"local", "uid"=>"User", "desc"=>"Normal application user", "dn"=>nil} } end
Public Instance Methods
print_user()
click to toggle source
Print out the user entitlement table in plain text, to be imported into database
# File lib/ucert/audiolog_tracker.rb, line 49 def print_user begin puts "Audiolog User Report in Plain-text Format" if @verbose @audiolog_user[1].keys.map {|x| print x,"|"} if @verbose puts if @verbose @audiolog_user.values.each do |record| record.values.map {|y| print y,"|"} puts end puts rescue => ee puts "Exception on method #{__method__}: #{ee}" end end