Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-23 21:10:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-23 21:10:18 +0300
commitbc62085601fa730985ea84f88a96c39d870c6ea6 (patch)
tree09ab45c32cb111607db05f121ec38b9b8184c64c /doc/development/cascading_settings.md
parent7e1e45d40a2312e20893ccfc6e7e5dfad6cf7b1c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/cascading_settings.md')
-rw-r--r--doc/development/cascading_settings.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/development/cascading_settings.md b/doc/development/cascading_settings.md
index b01cf9cb8d1..0233e9f9c3c 100644
--- a/doc/development/cascading_settings.md
+++ b/doc/development/cascading_settings.md
@@ -82,7 +82,9 @@ cascading_attr :delayed_project_removal
- `delayed_project_removal_locked_by_ancestor?`
- `delayed_project_removal_locked_by_application_setting?`
- `delayed_project_removal?` (Boolean attributes only)
-- `delayed_project_removal_locked_ancestor` - (Returns locked namespace settings object [namespace_id])
+- `delayed_project_removal_locked_ancestor` (Returns locked namespace settings object [namespace_id])
+
+### Attribute reader method (`delayed_project_removal`)
The attribute reader method (`delayed_project_removal`) returns the correct
cascaded value using the following criteria:
@@ -94,3 +96,12 @@ cascaded value using the following criteria:
1. Return this namespace's attribute, if not nil.
1. Return value from nearest ancestor where value is not nil.
1. Return instance-level application setting.
+
+### `_locked?` method
+
+By default, the `_locked?` method (`delayed_project_removal_locked?`) returns
+`true` if an ancestor of the group or application setting locks the attribute.
+It returns `false` when called from the group that locked the attribute.
+
+When `include_self: true` is specified, it returns `true` when called from the group that locked the attribute.
+This would be relevant, for example, when checking if an attribute is locked from a project.