Class: Gitlab::BackgroundMigration::FixPagesAccessLevel::Project

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Routable
Defined in:
lib/gitlab/background_migration/fix_pages_access_level.rb

Overview

Project

Constant Summary collapse

PRIVATE =
0
INTERNAL =
10
PUBLIC =
20

Instance Method Summary collapse

Methods included from Routable

#build_full_path

Instance Method Details

#pages_deployed?Boolean

Returns:

  • (Boolean)

43
44
45
# File 'lib/gitlab/background_migration/fix_pages_access_level.rb', line 43

def pages_deployed?
  Dir.exist?(public_pages_path)
end

#pages_pathObject


51
52
53
54
# File 'lib/gitlab/background_migration/fix_pages_access_level.rb', line 51

def pages_path
  # TODO: when we migrate Pages to work with new storage types, change here to use disk_path
  File.join(Settings.pages.path, build_full_path)
end

#public_pages_pathObject


47
48
49
# File 'lib/gitlab/background_migration/fix_pages_access_level.rb', line 47

def public_pages_path
  File.join(pages_path, 'public')
end