code: func (c *FSM) applyACLOperation(buf []byte, index uint64) interface{} {
  	// TODO (ACL-Legacy-Compat) - Should we warn here somehow about using deprecated features
  	//                            maybe emit a second metric?
  	var req structs.ACLRequest
  	if err := structs.Decode(buf, &req); err != nil {
  		panic(fmt.Errorf("failed to decode request: %v", err))
  	}
  	defer metrics.MeasureSinceWithLabels([]string{"fsm", "acl"}, time.Now(),
  		[]metrics.Label{{Name: "op", Value: string(req.Op)}})
  	switch req.Op {
  	case structs.ACLBootstrapInit:
  		enabled, _, err := c.state.CanBootstrapACLToken()
  		if err != nil {
  			return err
  		}
  		return enabled
  	case structs.ACLBootstrapNow:
  		// This is a bootstrap request from a non-upgraded node
  		if err := c.state.ACLBootstrap(index, 0, req.ACL.Convert(), true); err != nil {
  			return err
  		}
  
  		// No need to check expiration times as those did not exist in legacy tokens.
  		if _, token, err := c.state.ACLTokenGetBySecret(nil, req.ACL.ID); err != nil {
  			return err
  		} else {
  			acl, err := token.Convert()
  			if err != nil {
  				return err
  			}
  			return acl
  		}
  
  	case structs.ACLForceSet, structs.ACLSet:
  		if err := c.state.ACLTokenSet(index, req.ACL.Convert(), true); err != nil {
  			return err
  		}
  		return req.ACL.ID
  	case structs.ACLDelete:
  		return c.state.ACLTokenDeleteBySecret(index, req.ACL.ID)
  	default:
  		c.logger.Printf("[WARN] consul.fsm: Invalid ACL operation '%s'", req.Op)
  		return fmt.Errorf("Invalid ACL operation '%s'", req.Op)
  	}
  }
docs: // DEPRECATED (ACL-Legacy-Compat) - Only needed for legacy compat