Important

The Nessus Package is currently a Technology Preview

Permissions

Methods described in this section relate to the permissions API. These methods can be accessed at Nessus.permissions.

class PermissionsAPI(api: restfly.session.APISession)[source]
details(object_type: typing_extensions.Literal[scanner], object_id: int) List[Dict][source]

Retrieves the access control list for the specified object

Parameters
  • object_type (str) – The type of permissions object

  • object_id (int) – The unique id of the object to retrieve

Returns

List of ACL objects.

Return type

List

Example

>>> nessus.permissions.details('scanner', 1)
edit(object_type: typing_extensions.Literal[scanner], object_id: int, acls: List[Dict]) None[source]

Updates the permissions for the specified object

Parameters
  • object_type (str) – The type of object to modify

  • object_id (int) – The unique id of the object to modify

  • acls (list[dict]) – The list of access control objects to apply

Example

>>> nessus.permissions.edit('scanner', 1, acls=[
...     {
...         'type': 'default',
...         'permissions': 16
...     }, {
...         'type': 'user',
...         'permissions': 64,
...         'name': 'admin',
...         'id': 1,
...         'owner': 1
...     })