Skip to content

Commit dd602bb

Browse files
committed
Add insights permissions
1 parent 4171822 commit dd602bb

3 files changed

Lines changed: 18 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.27.3 (February 17th, 2026)
2+
3+
ENHANCEMENTS:
4+
* Adds support for DNS Insights permissions
5+
16
## 0.27.2 (February 10th, 2026)
27

38
ENHANCEMENTS:
@@ -38,7 +43,7 @@ ENHANCEMENTS:
3843
ENHANCEMENTS:
3944
* Adds support for specifying a list of views when creating zones with or without a provided zone file.
4045
* Adds support for specifying a zone name other than the FQDN when creating zones with or without a provided zone file.
41-
* A specified list of networks for a zone was only applied to zone creation when a zone file was not provided.
46+
* A specified list of networks for a zone was only applied to zone creation when a zone file was not provided.
4247

4348
## 0.21.0 (July 19th, 2024)
4449

ns1/__init__.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
from .config import Config
77

8-
version = "0.27.2"
8+
version = "0.27.3"
99

1010

1111
class NS1:
@@ -36,9 +36,7 @@ def _loadConfig(self, apiKey, configFile):
3636
if apiKey:
3737
self.config.createFromAPIKey(apiKey)
3838
else:
39-
configFile = (
40-
Config.DEFAULT_CONFIG_FILE if not configFile else configFile
41-
)
39+
configFile = Config.DEFAULT_CONFIG_FILE if not configFile else configFile
4240
self.config.loadFromFile(configFile)
4341

4442
# REST INTERFACE
@@ -300,13 +298,7 @@ def searchZone(
300298
return rest_zone.search(query, type, expand, max, callback, errback)
301299

302300
def createZone(
303-
self,
304-
zone,
305-
zoneFile=None,
306-
callback=None,
307-
errback=None,
308-
name=None,
309-
**kwargs
301+
self, zone, zoneFile=None, callback=None, errback=None, name=None, **kwargs
310302
):
311303
"""
312304
Create a new zone, and return an associated high level Zone object.
@@ -331,11 +323,7 @@ def createZone(
331323
zone = ns1.zones.Zone(self.config, zone)
332324

333325
return zone.create(
334-
zoneFile=zoneFile,
335-
name=name,
336-
callback=callback,
337-
errback=errback,
338-
**kwargs
326+
zoneFile=zoneFile, name=name, callback=callback, errback=errback, **kwargs
339327
)
340328

341329
def loadRecord(
@@ -367,9 +355,7 @@ def loadRecord(
367355
zone = ".".join(parts[1:])
368356
z = ns1.zones.Zone(self.config, zone)
369357

370-
return z.loadRecord(
371-
domain, type, callback=callback, errback=errback, **kwargs
372-
)
358+
return z.loadRecord(domain, type, callback=callback, errback=errback, **kwargs)
373359

374360
def loadMonitors(self, callback=None, errback=None, **kwargs):
375361
"""

ns1/rest/permissions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@
3636
"view_zones": False,
3737
"zones_allow_by_default": False,
3838
},
39+
"redirects": {
40+
"manage_redirects": False,
41+
},
42+
"insights": {
43+
"view_insights": False,
44+
"manage_insights": False,
45+
},
3946
}

0 commit comments

Comments
 (0)