app/models/fire_cloud_client.rb
# helper for creating FireCloud ACL objects
# will raise a RuntimeError if permission requested does not match allowed values in WORKSPACE_PERMISSONS
#
# * *params*
#   - +email+ (String) => email of FireCloud user
#   - +permission+ (String) => granted permission level
#   - +share_permission+ (Boolean) => whether or not user can share workspace
#   - +compute_permission+ (Boolean) => whether or not user can run computes in workspace
#
# * *return*
#   - +JSON+ ACL object
helper for creating FireCloud ACL objects
will raise a RuntimeError if permission requested does not match allowed values in WORKSPACE_PERMISSONS



*return
+JSON+ ACL object
helper for creating FireCloud ACL objects will raise a RuntimeError if permission requested does not match allowed values in WORKSPACE_PERMISSONS * return + JSON + ACL object
def create_workspace_acl(email, permission, share_permission=true, compute_permission=false)
    if WORKSPACE_PERMISSIONS.include?(permission)
      [
          {
              'email' => email,
              'accessLevel' => permission,
              'canShare' => share_permission,
              'canCompute' => compute_permission
          }
      ].to_json
    else
      raise RuntimeError.new("Invalid FireCloud ACL permission setting: #{permission}; must be member of #{WORKSPACE_PERMISSIONS.join(', ')}")
    end
  end
def create_workspace_acl ( email , permission , share_permission = true , compute_permission = false ) if WORKSPACE_PERMISSIONS . include? ( permission ) [ { 'email' => email , 'accessLevel' => permission , 'canShare' => share_permission , 'canCompute' => compute_permission } ] . to_json else raise RuntimeError . new ( "Invalid FireCloud ACL permission setting: #{permission}; must be member of #{WORKSPACE_PERMISSIONS.join(', ')}" ) end end
helper for creating FireCloud ACL objects
will raise a RuntimeError if permission requested does not match allowed values in WORKSPACE_PERMISSONS
helper for creating FireCloud ACL objects will raise a RuntimeError if permission requested does not match allowed values in WORKSPACE_PERMISSONS
email
<not_specific>
permission
<not_specific>
share_permission
<not_specific>
compute_permission
<not_specific>