Class: Atlassian::JiraConnect::JiraUser

Inherits:
Object
  • Object
show all
Defined in:
lib/atlassian/jira_connect/jira_user.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ JiraUser

Returns a new instance of JiraUser.


6
7
8
# File 'lib/atlassian/jira_connect/jira_user.rb', line 6

def initialize(data)
  @data = data
end

Instance Method Details

#site_admin?Boolean

Returns:

  • (Boolean)

10
11
12
13
14
15
# File 'lib/atlassian/jira_connect/jira_user.rb', line 10

def site_admin?
  groups = @data.dig('groups', 'items')
  return false unless groups

  groups.any? { |g| g['name'] == 'site-admins' }
end