ruby-jss 3.2.0b3 → 3.2.0b4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +12 -1
- data/lib/jamf/api/classic/api_objects/computer.rb +29 -0
- data/lib/jamf/api/classic/base_classes/api_object.rb +1 -1
- data/lib/jamf/api/connection/token.rb +5 -2
- data/lib/jamf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bb29ed920cff10a2b1ce05fd60b8fd3e21059b48df55895bf022116c605fbd1
|
4
|
+
data.tar.gz: 1ace6dbd8c45c84488e491cd7eca25fc966854444dd5017833ccc108d8373964
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb10817e7d1900728aaae05b49dd1db2ffa438260d49222ff9e97edcdc7d9fdca272a2c7a1d7ceb090336832dcbaf4a75567a9a4adfdde5ea77c392833608f06
|
7
|
+
data.tar.gz: 4b3fd77f2ef0c7ffe479eb9db2e9de731808ddf1de0bb3072ccf3ec3d115fee554a6bf822f23236c7fdd31086a27962578a9aa4e258be6e9a63d4ef14e4ba50a
|
data/CHANGES.md
CHANGED
@@ -17,6 +17,16 @@ Many many thanks to actae0n of Blacksun Hackers Club for reporting this issue an
|
|
17
17
|
--------
|
18
18
|
## \[UNRELEASED]
|
19
19
|
|
20
|
+
### Added
|
21
|
+
- Several new attributes to Jamf::Computer instances:
|
22
|
+
- `#enrolled_via_ade?` Boolean
|
23
|
+
- `#mdm_capable?` Boolean
|
24
|
+
- `#supervised?` Boolean
|
25
|
+
- `#user_approved_enrollment?` Boolean
|
26
|
+
- `#user_approved_mdm?` Boolean
|
27
|
+
- `#mdm_profile_expiration` Time
|
28
|
+
|
29
|
+
|
20
30
|
### Changed
|
21
31
|
- Improved handling of known API bug in Jamf::Scopable::Scope.
|
22
32
|
|
@@ -45,7 +55,8 @@ Many many thanks to actae0n of Blacksun Hackers Club for reporting this issue an
|
|
45
55
|
|
46
56
|
|
47
57
|
### Fixed
|
48
|
-
- Jamf::DeviceEnrollment.device no longer uses String#upcase!, which fails on frozen strings. Instead just use String#casecmp?
|
58
|
+
- `Jamf::DeviceEnrollment.device` no longer uses String#upcase!, which fails on frozen strings. Instead just use String#casecmp?
|
59
|
+
- `Jamf::APIConnection::Token#account` now returns an instance of `Jamf::OAPISchemas::AuthorizationV1`
|
49
60
|
|
50
61
|
## \[3.1.0] 2023-06-06
|
51
62
|
|
@@ -653,6 +653,12 @@ module Jamf
|
|
653
653
|
# @return [Time] the last time this machine was enrolled
|
654
654
|
attr_reader :last_enrolled
|
655
655
|
|
656
|
+
# @return [Boolean] was the last enrollment via ADE/DEP
|
657
|
+
attr_reader :enrolled_via_dep
|
658
|
+
alias enrolled_via_dep? enrolled_via_dep
|
659
|
+
alias enrolled_via_ade enrolled_via_dep
|
660
|
+
alias enrolled_via_ade? enrolled_via_dep
|
661
|
+
|
656
662
|
# @return [String] the primary macaddress
|
657
663
|
attr_reader :mac_address
|
658
664
|
|
@@ -664,6 +670,22 @@ module Jamf
|
|
664
670
|
|
665
671
|
# @return [Boolean] doesit support MDM?
|
666
672
|
attr_reader :mdm_capable
|
673
|
+
alias mdm_capable? mdm_capable
|
674
|
+
|
675
|
+
# @return [Boolean] Is it supervised?
|
676
|
+
attr_reader :supervised
|
677
|
+
alias supervised? supervised
|
678
|
+
|
679
|
+
# @return [Boolean] was enrollment user-approved
|
680
|
+
attr_reader :user_approved_enrollment
|
681
|
+
alias user_approved_enrollment? user_approved_enrollment
|
682
|
+
|
683
|
+
# @return [Boolean] was MDM user-approved (meaning the User authorized the MDM profile)
|
684
|
+
attr_reader :user_approved_mdm
|
685
|
+
alias user_approved_mdm? user_approved_mdm
|
686
|
+
|
687
|
+
# @return [Time] when does the mdm profile expire
|
688
|
+
attr_reader :mdm_profile_expiration
|
667
689
|
|
668
690
|
# @return [Hash] some MDM status details in general
|
669
691
|
attr_reader :management_status
|
@@ -901,13 +923,20 @@ module Jamf
|
|
901
923
|
@distribution_point = @init_data[:general][:distribution_point]
|
902
924
|
@initial_entry_date = JSS.epoch_to_time @init_data[:general][:initial_entry_date_epoch]
|
903
925
|
@last_enrolled = JSS.epoch_to_time @init_data[:general][:last_enrolled_date_epoch]
|
926
|
+
@enrolled_via_dep = @init_data[:general][:management_status][:enrolled_via_dep]
|
904
927
|
@ip_address = @init_data[:general][:ip_address]
|
905
928
|
@reported_ip_address = @init_data[:general][:last_reported_ip]
|
906
929
|
@itunes_store_account_is_active = @init_data[:general][:itunes_store_account_is_active]
|
907
930
|
@jamf_version = @init_data[:general][:jamf_version]
|
908
931
|
@last_contact_time = JSS.epoch_to_time @init_data[:general][:last_contact_time_epoch]
|
932
|
+
|
909
933
|
@mdm_capable = @init_data[:general][:mdm_capable]
|
910
934
|
@mdm_capable_users = @init_data[:general][:mdm_capable_users].values
|
935
|
+
@supervised = @init_data[:general][:supervised]
|
936
|
+
@user_approved_enrollment = @init_data[:general][:management_status][:user_approved_enrollment]
|
937
|
+
@user_approved_mdm = @init_data[:general][:management_status][:user_approved_mdm]
|
938
|
+
@mdm_profile_expiration = JSS.epoch_to_time @init_data[:general][:mdm_profile_expiration_epoch]
|
939
|
+
|
911
940
|
@netboot_server = @init_data[:general][:netboot_server]
|
912
941
|
@platform = @init_data[:general][:platform]
|
913
942
|
@report_date = JSS.epoch_to_time @init_data[:general][:report_date_epoch]
|
@@ -1139,7 +1139,7 @@ module Jamf
|
|
1139
1139
|
def self.create(**args)
|
1140
1140
|
validate_not_metaclass(self)
|
1141
1141
|
unless constants.include?(:CREATABLE)
|
1142
|
-
raise Jamf::UnsupportedError, "Creating #{self
|
1142
|
+
raise Jamf::UnsupportedError, "Creating #{self::RSRC_LIST_KEY} isn't yet supported. Please use other Casper workflows."
|
1143
1143
|
end
|
1144
1144
|
raise ArgumentError, "Use '#{self.class}.fetch id: xx' to retrieve existing JSS objects" if args[:id]
|
1145
1145
|
|
@@ -306,7 +306,10 @@ module Jamf
|
|
306
306
|
REFRESH_RESULTS[@last_refresh_result]
|
307
307
|
end
|
308
308
|
|
309
|
-
# the Jamf
|
309
|
+
# the Jamf account assciated with this token, which contains info about
|
310
|
+
# privileges and Jamf acct group memberships and Jamf Acct settings
|
311
|
+
#
|
312
|
+
# @return [Jamf::OAPISchemas::AuthorizationV1] the Authorization object
|
310
313
|
#################################
|
311
314
|
def account
|
312
315
|
return @account if @account
|
@@ -314,7 +317,7 @@ module Jamf
|
|
314
317
|
resp = token_connection(AUTH_RSRC, token: @token).get
|
315
318
|
return unless resp.success?
|
316
319
|
|
317
|
-
@account = Jamf::
|
320
|
+
@account = Jamf::OAPISchemas::AuthorizationV1.new resp.body
|
318
321
|
end
|
319
322
|
|
320
323
|
# Use this token to get a fresh one. If a pw is provided
|
data/lib/jamf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-jss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.0b4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Lasell
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-08-
|
13
|
+
date: 2023-08-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: CFPropertyList
|