permissions.rb
def find_user(email)
    url  = "/gdc/projects/#{@project_id}/users"
    resp = GoodData.get url
    resp['users'].each do |u|
      user = u['user']
      if user['content']['email'] == email
        return user['links']['self']
      end
    end
    raise ArgumentError.new "User '#{email}' is not a member of project '#{@project_id}'"
  end
# Returns a GoodData URI representing the user specified by the email
# address.
# @throw ArgumentError if the user is not the project member
Returns a GoodData URI representing the user specified by the email
address.
Returns a GoodData URI representing the user specified by the email address .
def find_user(email)
    url  = "/gdc/projects/#{@project_id}/users"
    resp = GoodData.get url
    resp['users'].each do |u|
      user = u['user']
      if user['content']['email'] == email
        return user['links']['self']
      end
    end
    raise ArgumentError.new "User '#{email}' is not a member of project '#{@project_id}'"
  end
def find_user ( email ) url = "/gdc/projects/#{@project_id}/users" resp = GoodData . get url resp [ 'users' ] . each do | u | user = u [ 'user' ] if user [ 'content' ] [ 'email' ] == email return user [ 'links' ] [ 'self' ] end end raise ArgumentError . new "User '#{email}' is not a member of project '#{@project_id}'" end
Returns a GoodData URI representing the user specified by the email
address.
Returns a GoodData URI representing the user specified by the email address .
email
throw
ArgumentError if the user is not the project member
ArgumentError if the user is not the project member