INNER CODE UNIT · JavaScript

AccessTable

infrahq/infra · ui/pages/destinations/[id]/index.js:368

function AccessTable({
  grants,
  users,
  groups,
  destination,
  onUpdate,
  onRemove,
}) {
  const grantsSubject = [...new Set(grants?.map(g => g.user || g.group))]
  let grantsList = []
  grantsSubject.forEach(subject => {
    let type = 'user'
    const grantArray = grants.filter(g => {
      if (g.group === subject) {
        type = 'group'
      }
      return g.user === subject || g.group === subject
    })

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…