<commit_before># coding: utf-8
class Ability
  include CanCan::Ability

  def initialize(current_user)
    current_user ||= User.new

    can :show, User
    can :manage, User, :id => current_user.id
    can :request_refund, Backer, :user_id => current_user.id
    can :backs, User
    can :projects, User

    if current_user.persisted?
      can :index, User
    end

    if current_user.admin?
      can :manage, :all
    else
      can :manage, Project do |project|
        current_user.can_manage_project?(project)
      end
      can :manage, Reward do |reward|
        current_user.can_manage_project?(reward.project)
      end
    end
  end

end
<commit_msg>Permit access to curated pages<commit_after># coding: utf-8
class Ability
  include CanCan::Ability

  def initialize(current_user)
    current_user ||= User.new

    can :show, User
    can :manage, User, :id => current_user.id
    can :request_refund, Backer, :user_id => current_user.id
    can :backs, User
    can :projects, User

    can :show, CuratedPage, :visible => true

    if current_user.persisted?
      can :index, User
    end

    if current_user.admin?
      can :manage, :all
    else
      can :manage, Project do |project|
        current_user.can_manage_project?(project)
      end
      can :manage, Reward do |reward|
        current_user.can_manage_project?(reward.project)
      end
    end
  end

end

{'fraction_non_alphanumeric': 0.09032258064516129, 'fraction_numerical': 0.0014336917562724014, 'mean_word_length': 2.752688172043011, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2602415', 'n_tokens_mistral': 472, 'n_tokens_neox': 454, 'n_words': 127}