Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micmmakarov/d73fafdcbbf627d0c0ec449cea0bde0f to your computer and use it in GitHub Desktop.
Save micmmakarov/d73fafdcbbf627d0c0ec449cea0bde0f to your computer and use it in GitHub Desktop.
scoped_key = Keen::ScopedKey.new('KEEN_MASTER_KEY', allowed_operations: ["read"], filters: [{ # master_key should be a variable that contains your Keen master key
'property_name' => 'company.id',
'operator' => 'eq',
'property_value' => current_company.id # current_user.id should be a variable that contains the customer ID
}]).encrypt!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment