Method: Reedb::Vault.access_headers
- Defined in:
- lib/reedb.rb
.access_headers(uuid, token, search = nil) ⇒ Object
List headers from a vault with a search qeury (nil by default). Can only be used with a token on vaults that authentication has been successful before.
721 722 723 724 725 726 727 728 729 730 731 |
# File 'lib/reedb.rb', line 721 def access_headers(uuid, token, search = nil) token.delete!("\n") raise VaultNotAvailableError.new, 'The vault you have requested data from is not currently active on this system.' unless @@active_vaults[uuid] raise UnknownTokenError.new, 'The token you provided is unknown to this system. Access denied!' unless @@tokens[token] raise UnautherisedTokenError.new, 'The token you provided currently has no access to the desired vault. Access denied!' unless @@tokens[token].include?(uuid) debouncer.debounce_vault(uuid) return @@active_vaults[uuid].list_headers(search) end |