Class: Types::Namespaces::Metadata::ProjectNamespaceMetadataType
- Inherits:
-
BaseObject
- Object
- GraphQL::Schema::Object
- BaseObject
- Types::Namespaces::Metadata::ProjectNamespaceMetadataType
show all
- Defined in:
- app/graphql/types/namespaces/metadata/project_namespace_metadata_type.rb
Overview
rubocop:disable Graphql/AuthorizeTypes – parent is already authorized
Instance Method Summary
collapse
Methods inherited from BaseObject
accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id
#present, #unpresented
Instance Method Details
#default_branch ⇒ Object
18
19
20
|
# File 'app/graphql/types/namespaces/metadata/project_namespace_metadata_type.rb', line 18
def default_branch
project.default_branch_or_main
end
|
#group_id ⇒ Object
37
38
39
|
# File 'app/graphql/types/namespaces/metadata/project_namespace_metadata_type.rb', line 37
def group_id
group&.id&.to_s
end
|
#issue_repositioning_disabled? ⇒ Boolean
22
23
24
|
# File 'app/graphql/types/namespaces/metadata/project_namespace_metadata_type.rb', line 22
def issue_repositioning_disabled?
project.root_namespace.issue_repositioning_disabled?
end
|
#show_new_work_item? ⇒ Boolean
26
27
28
29
30
31
32
33
34
35
|
# File 'app/graphql/types/namespaces/metadata/project_namespace_metadata_type.rb', line 26
def show_new_work_item?
return false if project.self_or_ancestors_archived?
return true unless current_user
can?(current_user, :create_work_item, project)
end
|