mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add vlan_groups to Region, SiteGroup, Site, Location, Rack, ClusterGroup, Cluster
This commit is contained in:
@@ -2,6 +2,7 @@ import graphene
|
||||
|
||||
__all__ = (
|
||||
'IPAddressesMixin',
|
||||
'VLANGroupsMixin',
|
||||
)
|
||||
|
||||
|
||||
@@ -10,3 +11,10 @@ class IPAddressesMixin:
|
||||
|
||||
def resolve_ip_addresses(self, info):
|
||||
return self.ip_addresses.restrict(info.context.user, 'view')
|
||||
|
||||
|
||||
class VLANGroupsMixin:
|
||||
vlan_groups = graphene.List('ipam.graphql.types.VLANGroupType')
|
||||
|
||||
def resolve_vlan_groups(self, info):
|
||||
return self.vlan_groups.restrict(info.context.user, 'view')
|
||||
|
Reference in New Issue
Block a user