File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -790,13 +790,20 @@ def disable_password_policies():
790790 set_sys_property (
791791 instance = SNowInstance (), property_name = "glide.apply.password_policy.on_login" , value = "false"
792792 )
793- # The following is not supported on developer portal instances
794- if not _is_dev_portal_instance () :
793+ # Exception handling since this property is sometimes read-only on some instances
794+ try :
795795 set_sys_property (
796796 instance = SNowInstance (),
797797 property_name = "glide.authenticate.api.user.reset_password.mandatory" ,
798798 value = "false" ,
799799 )
800+ except Exception :
801+ logging .warning (
802+ "Warning: Failed to set sys property "
803+ "'glide.authenticate.api.user.reset_password.mandatory'. Continuing." ,
804+ exc_info = True ,
805+ )
806+
800807 logging .info ("Password policies disabled." )
801808
802809
You can’t perform that action at this time.
0 commit comments