gitlab-org--gitlab-foss/lib/atlassian/jira_connect/jira_user.rb

19 lines
334 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Atlassian
module JiraConnect
class JiraUser
def initialize(data)
@data = data
end
def site_admin?
groups = @data.dig('groups', 'items')
return false unless groups
groups.any? { |g| g['name'] == 'site-admins' }
end
end
end
end