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: collection_type_ability.rb
    path of file: ./repos/hyrax/app/models/concerns/hyrax/ability
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module Hyrax
  module Ability
    module CollectionTypeAbility
      def collection_type_abilities
        if admin?
          ca
    
      def collection_type_abilities
        if admin?
          can :manage, CollectionType
          can :create_collection_type, CollectionType
        else
          can :create_collection_of_type, CollectionType do |collection_type|
            Hyrax::CollectionTypes::PermissionsService.can_create_collection_of_type?(ability: self, collection_type: collection_type)
          end
        end