code: func (p Permissions) FromProto(resp *access.PermittedActionsResponse) error {
  	// Clean up p before we populate it.
  	for bucket := range p {
  		delete(p, bucket)
  	}
  	for bucket, actions := range resp.Permitted {
  		newActions := Action(0)
  		for _, action := range actions.Actions {
  			newAction, err := ParseAction(action)
  			if err != nil {
  				return err
  			}
  			newActions |= newAction
  		}
  		p[bucket] = newActions
  	}
  	return nil
  }
docs: // FromProto populates a Permissions from an access.PermittedActionsResponse.