stringer-rss/stringer

View on GitHub
lib/admin_constraint.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class AdminConstraint
  def matches?(request)
    request.session.key?(:user_id) &&
      User.find(request.session[:user_id]).admin?
  end
end