Class: Organizations::PathValidator

Inherits:
NamespacePathValidator show all
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 inherited from NamespacePathValidator

format_error_message, format_regex

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, #strip_bom, #unquote_path

Methods inherited from AbstractPathValidator

format_error_message, format_regex, valid_path?, #validate_each

Class Method Details

.path_regexObject



5
6
7
# File 'app/validators/organizations/path_validator.rb', line 5

def self.path_regex
  Gitlab::PathRegex.organization_path_regex
end

Instance Method Details

#build_full_path_to_validate_against_reserved_names?Boolean

Returns:

  • (Boolean)


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

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