Class: NotePolicy
- Inherits:
-
BasePolicy
- Object
- DeclarativePolicy::Base
- BasePolicy
- NotePolicy
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/policies/note_policy.rb
Instance Method Summary collapse
Instance Method Details
#parent_namespace ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'app/policies/note_policy.rb', line 102 def parent_namespace strong_memoize(:parent_namespace) do next if @subject.is_a?(PersonalSnippet) next @subject.noteable.group if @subject.noteable.is_a?(Epic) @subject.project end end |