Class: NamespaceSetting

Inherits:
ApplicationRecord show all
Includes:
CascadingNamespaceSettingAttribute, ChronicDurationAttribute, Sanitizable
Defined in:
app/models/namespace_setting.rb

Constant Summary collapse

NAMESPACE_SETTINGS_PARAMS =
[:default_branch_name, :delayed_project_removal,
:lock_delayed_project_removal, :resource_access_token_creation_allowed,
:prevent_sharing_groups_outside_hierarchy, :new_user_signups_cap,
:setup_for_company, :jobs_to_be_done, :runner_token_expiration_interval,
:subgroup_runner_token_expiration_interval, :project_runner_token_expiration_interval].freeze

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Method Summary collapse

Methods included from ChronicDurationAttribute

#chronic_duration_attributes, #output_chronic_duration_attribute

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#prevent_sharing_groups_outside_hierarchyObject


34
35
36
37
38
# File 'app/models/namespace_setting.rb', line 34

def prevent_sharing_groups_outside_hierarchy
  return super if namespace.root?

  namespace.root_ancestor.prevent_sharing_groups_outside_hierarchy
end