File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,25 @@ def get_contact_by_username(self, user):
452452 person = self .get_person_by_username (user )
453453 return self .get_contact_by_person_id (person ['id' ])
454454
455+ def get_grouprights_by_username (self , user ):
456+ """
457+ Returns accessrights for a given username
458+
459+ Arguments:
460+ user -- Netdot Username
461+
462+ Usage:
463+ response = netdot.Client.get_accesrights_by_username("mary")
464+ """
465+ contacts = self .get_contact_by_username (user )
466+ groupright = {}
467+ print contacts
468+ for values in contacts ['Contact' ].values ():
469+ groupright += self .get_grouprights_by_conlist_id (values ['contactlist' ])
470+
471+ return groupright
472+
473+
455474 def get_grouprights_by_conlist_id (self , id ):
456475 """
457476 Returns a single-level dict of the requested group's
You can’t perform that action at this time.
0 commit comments