debian-mirror-gitlab/lib/atlassian/jira_connect/jira_user.rb
2021-09-04 01:27:46 +05:30

18 lines
334 B
Ruby

# 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