Fetching gitlab-license-2.4.0.gem Successfully installed gitlab-license-2.4.0 Parsing documentation for gitlab-license-2.4.0 Installing ri documentation for gitlab-license-2.4.0 Done installing documentation for gitlab-license after 0 seconds 1 gem installed
data = File.read("GitLabBV.gitlab-license") $license = Gitlab::License.import(data)
puts "Imported license:" puts $license
unless$license raise"The license is invalid." end
if$license.restricted?(:active_user_count) active_user_count = 10000 if active_user_count > $license.restrictions[:active_user_count] raise"The active user count exceeds the allowed amount!" end end
if$license.notify_admins? puts "The license is due to expire on #{$license.expires_at}." end
if$license.notify_users? puts "The license is due to expire on #{$license.expires_at}." end
moduleGitlab classGitAccess defcheck(cmd, changes = nil) if$license.block_changes? return build_status_object(false, "License expired") end end end end
puts "This instance of GitLab Enterprise Edition is licensed to:" $license.licensee.each do |key, value| puts "#{key}: #{value}" end
if$license.expired? puts "The license expired on #{$license.expires_at}" elsif$license.will_expire? puts "The license will expire on #{$license.expires_at}" else puts "The license will never expire." end