code: func AuthorizationAttributesFrom(spec authorizationapi.SubjectAccessReviewSpec) authorizer.AttributesRecord {
  	userToCheck := &user.DefaultInfo{
  		Name:   spec.User,
  		Groups: spec.Groups,
  		UID:    spec.UID,
  		Extra:  convertToUserInfoExtra(spec.Extra),
  	}
  
  	var authorizationAttributes authorizer.AttributesRecord
  	if spec.ResourceAttributes != nil {
  		authorizationAttributes = ResourceAttributesFrom(userToCheck, *spec.ResourceAttributes)
  	} else {
  		authorizationAttributes = NonResourceAttributesFrom(userToCheck, *spec.NonResourceAttributes)
  	}
  
  	return authorizationAttributes
  }
docs: // AuthorizationAttributesFrom takes a spec and returns the proper authz attributes to check it.