Home / Function/ PolicyAllowedOperation() — supabase Function Reference

PolicyAllowedOperation() — supabase Function Reference

Architecture documentation for the PolicyAllowedOperation() function in PolicyAllowedOperation.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyAllowedOperation.tsx lines 9–39

const PolicyAllowedOperation = ({
  operation = '',
  onSelectOperation = noop,
}: PolicyAllowedOperationProps) => {
  return (
    <div className="flex justify-between space-x-12">
      <div className="flex w-1/3 flex-col space-y-2">
        <label className="text-base text-foreground-light" htmlFor="allowed-operation">
          Allowed operation
        </label>
        <p className="text-sm text-foreground-lighter">Select an operation for this policy</p>
      </div>
      <div className="w-2/3">
        <div className="flex items-center space-x-8">
          <Radio.Group type="small-cards" size="tiny" id="allowed-operation">
            {['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'ALL'].map((op) => (
              <Radio
                key={op}
                name="allowed-operation"
                label={op}
                value={op}
                checked={operation === op}
                onChange={(e) => onSelectOperation(e.target.value)}
              />
            ))}
          </Radio.Group>
        </div>
      </div>
    </div>
  )
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free