|
24 | 24 | #
|
25 | 25 | # 1.1.0 2019.07.16 Initial version. tjm
|
26 | 26 | #
|
| 27 | +# 1.1.1 2019.07.22 Adjusted server url handling. tjm |
| 28 | +# |
27 | 29 | #
|
28 | 30 | ################################################################################
|
29 | 31 |
|
@@ -82,11 +84,21 @@ def __init__(self, logger, args):
|
82 | 84 |
|
83 | 85 | # self.display_config()
|
84 | 86 |
|
85 |
| - if "https" and "8443" not in self.config_file.get('login', 'hosts'): |
86 |
| - self.config_file.set('login', 'hosts', "https://" + self.config_file.get('login', 'hosts') + ":8443") |
| 87 | + working_server_name = self.config_file.get('login', 'hosts') |
| 88 | + |
| 89 | + if "https" not in working_server_name: |
| 90 | + if "http" in working_server_name: |
| 91 | + working_server_name.replace("http", "https") |
| 92 | + else: |
| 93 | + working_server_name = "https://" + working_server_name |
| 94 | + |
| 95 | + if "jamfcloud" and "8443" not in working_server_name: |
| 96 | + working_server_name = working_server_name + ":8443" |
| 97 | + |
| 98 | + self.config_file.set('login', 'hosts', working_server_name) |
87 | 99 |
|
88 | 100 | #
|
89 |
| - # This is really important. This list contains the required rights for the fields we need to access |
| 101 | + # THIS IS REALLY IMPORTANT. This list contains the required rights for the fields we need to access |
90 | 102 | # Could be moved to configuration file, if appropriate.
|
91 | 103 | self.read_privileges = ['Read Computers', 'Read LDAP Servers', 'Read Accounts', 'Read User']
|
92 | 104 | self.update_privileges = ['Update Computers', 'Update User']
|
|
0 commit comments