lib/fire_cloud_client.rb
# helper for creating FireCloud Method ACL objects
# will raise a RuntimeError if permission requested does not match allowed values in METHOD_PERMISSONS
#
# * *params*
#   - +user+ (String) => email of FireCloud user, or 'public' for public access
#   - +role+ (String) => granted permission level
#
# * *return*
#   - +JSON+ ACL object
helper for creating FireCloud Method ACL objects
will raise a RuntimeError if permission requested does not match allowed values in METHOD_PERMISSONS

*params
+user+ (String) => email of FireCloud user, or 'public' for public access
+role+ (String) => granted permission level

*return
+JSON+ ACL object
helper for creating FireCloud Method ACL objects will raise a RuntimeError if permission requested does not match allowed values in METHOD_PERMISSONS * params + user + ( String ) = > email of FireCloud user or ' public ' for public access + role + ( String ) = > granted permission level * return + JSON + ACL object
def create_method_acl(user, role)
    if METHOD_PERMISSIONS.include?(role)
      [
          {
              'user' => user,
              'role' => role
          }
      ].to_json
    else
      raise RuntimeError.new("Invalid FireCloud Method ACL permission setting: #{role}; must be member of #{METHOD_PERMISSIONS.join(', ')}")
    end
  end
def create_method_acl ( user , role ) if METHOD_PERMISSIONS . include? ( role ) [ { 'user' => user , 'role' => role } ] . to_json else raise RuntimeError . new ( "Invalid FireCloud Method ACL permission setting: #{role}; must be member of #{METHOD_PERMISSIONS.join(', ')}" ) end end
helper for creating FireCloud Method ACL objects
will raise a RuntimeError if permission requested does not match allowed values in METHOD_PERMISSONS
helper for creating FireCloud Method ACL objects will raise a RuntimeError if permission requested does not match allowed values in METHOD_PERMISSONS
user
<not_specific>
role
<not_specific>