akkounts/app/helpers/oauth_helper.rb

12 lines
159 B
Ruby

module OauthHelper
def scope_name(scope)
scope.gsub(/(\:.+)/, '')
end
def scope_permissions(scope)
scope.match(/\:r$/) ? "r" : "rw"
end
end