Class: Organizations::PathValidator

Inherits:
AbstractPathValidator show all
Extended by:
Gitlab::EncodingHelper
Defined in:
app/validators/organizations/path_validator.rb

Constant Summary

Constants included from Gitlab::EncodingHelper

Gitlab::EncodingHelper::BOM_UTF8, Gitlab::EncodingHelper::ENCODING_CONFIDENCE_THRESHOLD, Gitlab::EncodingHelper::ESCAPED_CHARS, Gitlab::EncodingHelper::UNICODE_REPLACEMENT_CHARACTER

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Gitlab::EncodingHelper

binary_io, detect_binary?, detect_encoding, detect_libgit2_binary?, encode!, encode_binary, encode_utf8, encode_utf8_no_detect, encode_utf8_with_escaping!, encode_utf8_with_replacement_character, force_encode_utf8, strip_bom, unquote_path

Methods inherited from AbstractPathValidator

valid_path?, #validate_each

Class Method Details

.format_error_messageObject



15
16
17
# File 'app/validators/organizations/path_validator.rb', line 15

def self.format_error_message
  Gitlab::PathRegex.organization_format_message
end

.format_regexObject



11
12
13
# File 'app/validators/organizations/path_validator.rb', line 11

def self.format_regex
  Gitlab::PathRegex.organization_format_regex
end

.path_regexObject



7
8
9
# File 'app/validators/organizations/path_validator.rb', line 7

def self.path_regex
  Gitlab::PathRegex.organization_path_regex
end

Instance Method Details

#build_full_path_to_validate_against_reserved_names?Boolean

Returns:

  • (Boolean)


19
20
21
22
23
# File 'app/validators/organizations/path_validator.rb', line 19

def build_full_path_to_validate_against_reserved_names?
  # full paths cannot be built for organizations because organizations do not have a parent
  # and it does not include the `Routable` concern.
  false
end