title: Spring security authrorize based on input parameter criteria
body: <p>I have a scenario where I need to authorize user based on combination of his permission and input parameter passed.</p>
  
  <p>this is the current scenario </p>
  
  <pre><code>public void bookTicket(String bookingType)
      {
      if (bookingType == "AIR"){
           bookAirTicket();
      }else{
           bookBusTicket();
      }
      }
  
  
  @PreAuthorize("hasRole('BOOK_AIR')")
  private void bookAirTicket(){
  }
  
  @PreAuthorize("hasRole('BOOK_BUS')")
  private void bookBusTicket(){
  }
  </code></pre>
  
  <p>Can we have some thing like</p>
  
  <pre><code>@PreAuthorize(("hasRole('BOOK_AIR')" AND bookinType='AIR') OR ("hasRole('BOOK_BUS')"  AND bookinType='BUS'))
  public void bookTicket(String bookingType)
      {
      if (bookingType == "AIR"){
           bookAirTicket();
      }else{
           bookBusTicket();
      }
      }
  </code></pre>
  
  <p>Basically I need authorization based in input parameters</p>
  
  <p>Thanks</p>