You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ability.rb
    path of file: ./repos/kms/app/models
    
    the code of the file until where you have to start completion: class Ability
  include CanCan::Ability

  def initialize(user)
    # Define abilities for the
    
  def initialize(user)
    # Define abilities for the passed in user here. For example:
    #
    user ||= Kms::User.new # guest user (not logged in)
    if user.admin?
      can :manage, :all
    else
      can :manage, Kms::Page
      can :manage, Kms::Asset
      can :index, Kms::Template
      Kms::AbilityService.abilities.each do |ability_block|
        instance_eval(&ability_block)
      end
    end