roadrecon 1.4.0__py3-none-any.whl → 1.5.0__py3-none-any.whl

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.
@@ -587,7 +587,7 @@ class AccessPoliciesPlugin():
587
587
  loc['name'] = escape(detail.get("NetworkName"))
588
588
  loc['trusted'] = ("trusted" in detail.get("Categories","") if detail.get("Categories") else False)
589
589
  loc['appliestounknowncountry'] = escape(str(detail.get("ApplyToUnknownCountry"))) if detail.get("ApplyToUnknownCountry") is not None else False
590
- loc['ipranges'] = "\n<br />".join(detail.get('CidrIpRanges'))
590
+ loc['ipranges'] = "\n<br />".join(detail.get('CidrIpRanges')) if detail.get("CidrIpRanges") else ""
591
591
  loc['categories'] = escape(", ".join(detail.get("Categories"))) if detail.get("Categories") is not None else ""
592
592
  loc['associated_policies'] = "\n<br />".join(self._parse_associated_polcies(detail.get('NetworkId'),loc['trusted'],condition_policy_list))
593
593
  loc['country_codes'] = escape(", ".join(detail.get("CountryIsoCodes"))) if detail.get("CountryIsoCodes") else None
@@ -157,6 +157,10 @@ class TenantDetailSchema(RTModelSchema):
157
157
  class Meta(RTModelSchema.Meta):
158
158
  model = TenantDetail
159
159
 
160
+ class DirectorySettingSchema(RTModelSchema):
161
+ class Meta(RTModelSchema.Meta):
162
+ model = DirectorySetting
163
+
160
164
  class AuthorizationPolicySchema(RTModelSchema):
161
165
  class Meta(RTModelSchema.Meta):
162
166
  model = AuthorizationPolicy
@@ -167,6 +171,7 @@ device_schema = DeviceSchema()
167
171
  group_schema = GroupSchema()
168
172
  application_schema = ApplicationSchema()
169
173
  td_schema = TenantDetailSchema()
174
+ ds_schema = DirectorySettingSchema()
170
175
  serviceprincipal_schema = ServicePrincipalSchema()
171
176
  administrativeunit_schema = AdministrativeUnitSchema()
172
177
  authorizationpolicy_schema = AuthorizationPolicySchema(many=True)
@@ -529,6 +534,11 @@ def get_tenantdetails():
529
534
  drs = db.session.query(TenantDetail).first()
530
535
  return td_schema.jsonify(drs)
531
536
 
537
+ @app.route("/api/directorysettings", methods=["GET"])
538
+ def get_directorysettings():
539
+ drs = db.session.query(DirectorySetting).first()
540
+ return ds_schema.jsonify(drs)
541
+
532
542
  @app.route("/api/authorizationpolicies", methods=["GET"])
533
543
  def get_authpolicies():
534
544
  drs = db.session.query(AuthorizationPolicy).all()