You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found this bug where a self_service_category can have it's display_in to false but if it is in the array, it will default to true anyways when posted to the API.
Example:
I run the command: policy.add_self_service_category 'Testing', display_in: false
Validate the results are correct: policy.self_service_categories which results to `[{:id=>18, :name=>"Testing", :display_in=>false, :feature_in=>false}]
However, when I pull from the API again, and run policy.self_service_categories which results to `[{:id=>18, :name=>"Testing", :display_in=>true, :feature_in=>false}]
Suggested fixes:
If display_in is set to false, throw and error
if display_in is set to false, remove from self_service_categories
Force display_in to be set to true, push user to use policy.remove_self_service_category(cat) to remove categories
The text was updated successfully, but these errors were encountered:
cybertunnel
changed the title
Self Service Categories Able to Set :display_in to false
Policy's Self Service Category able to be removed from Self Service Categories
Apr 8, 2020
Turns out the above issue was around my error. However, this did bring to light a bug where ruby-jss allows me to remove the category the policy is assigned.
This violates Jamf's Self Service functions of categories since a policy's category has the policy always displayed in Self Service under that category.
Suggested fix:
Throw an error when user attempts to remove the category the policy/object is assigned to using the policy.remove_self_service_category
Found this bug where a self_service_category can have it's
display_in
tofalse
but if it is in the array, it will default to true anyways when posted to the API.Example:
policy.add_self_service_category 'Testing', display_in: false
policy.self_service_categories
which results to `[{:id=>18, :name=>"Testing", :display_in=>false, :feature_in=>false}]policy.self_service_categories
which results to `[{:id=>18, :name=>"Testing", :display_in=>true, :feature_in=>false}]Suggested fixes:
display_in
is set to false, throw and errordisplay_in
is set to false, remove fromself_service_categories
display_in
to be set totrue
, push user to usepolicy.remove_self_service_category(cat)
to remove categoriesThe text was updated successfully, but these errors were encountered: