cloud_controller/app/models/service.rb
# Returns true if user matches any of the wildcards
# false otherwise.
Returns true if user matches any of the wildcards
false otherwise.
Returns true if user matches any of the wildcards false otherwise .
def user_match_wildcards?(user, wildcards)
    wildcards.each do |wc|
      re_str = Regexp.escape(wc).gsub('\*', '.*?')
      return true if user.email =~ /^#{re_str}$/
    end if wildcards
    false
  end
def user_match_wildcards? ( user , wildcards ) wildcards . each do | wc | re_str = Regexp . escape ( wc ) . gsub ( '\*' , '.*?' ) return true if user . email =~ / ^ #{ re_str } $ / end if wildcards false end
Returns true if user matches any of the wildcards
false otherwise.
Returns true if user matches any of the wildcards false otherwise .
user
wildcards