Class: Fog::Proxmox::Identity::Permissions

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/identity/proxmox/models/permissions.rb

Overview

class Permissions authentication

Instance Method Summary collapse

Instance Method Details

#allObject



29
30
31
# File 'lib/fog/identity/proxmox/models/permissions.rb', line 29

def all
  load service.list_permissions
end

#destroy(permission_hash) ⇒ Object



37
38
39
40
# File 'lib/fog/identity/proxmox/models/permissions.rb', line 37

def destroy(permission_hash)
  permission = new(permission_hash)
  permission.destroy
end

#get(type, path, roleid, ugid) ⇒ Object



33
34
35
# File 'lib/fog/identity/proxmox/models/permissions.rb', line 33

def get(type, path, roleid, ugid)
  all.find { |permission| permission.type === type && permission.path === path && permission.roleid === roleid && permission.ugid === ugid }
end