Class: Types::WorkItems::Widgets::AssigneesType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/work_items/widgets/assignees_type.rb

Overview

Disabling widget level authorization as it might be too granular and we already authorize the parent work item rubocop:disable Graphql/AuthorizeTypes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Class Method Details

.authorization_scopesObject



15
16
17
# File 'app/graphql/types/work_items/widgets/assignees_type.rb', line 15

def self.authorization_scopes
  super + [:ai_workflows]
end

Instance Method Details

#can_invite_members?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'app/graphql/types/work_items/widgets/assignees_type.rb', line 42

def can_invite_members?
  Ability.allowed?(current_user, :invite_project_members, object.work_item.project)
end