title: You don't have the permission to access the requested resource error is geven when a post request is sent
body: <p>I am tring to send a 'POST' request and catch it from python backend. I use flask python framework. Actually, I am doing changes to already developed application.</p>
  
  <p>in the templates I found the code that generate the relavent html. </p>
  
  <pre><code>&lt;div class="body"&gt;
                      &lt;p&gt;
                          Upload files for the customer {{customer.CustomerName}}.
                      &lt;/p&gt;
                      &lt;p&gt;
  
                      &lt;/p&gt;
  
                      &lt;form method="POST"  action="/admin/customers/{{ customer.ID }}/file_uploading/"&gt;
  
                          &lt;!--   &lt;input type="file" name="pdfFiles"&gt; --&gt;
  
                              &lt;br&gt;&lt;br&gt;
                       &lt;!--     &lt;input type="submit" value="Upload" name="submit"&gt; --&gt;
                              &lt;button type="submit" class="btn btn-transparent"&gt;Upload&lt;/button&gt;
                      &lt;/form&gt;
  
  
  
  &lt;/div&gt;
  </code></pre>
  
  <p>Here, I try to catch the POST request.</p>
  
  <pre><code>@app.route('/admin/customers/&lt;cust_id&gt;/&lt;action&gt;/', methods=[ 'GET', 'POST' ])
  @login_required
  def main_admin_customers(cust_id=None, action=None, subaction=None):
   if cust_id == None:
          c = customers.customer_details()
          return render_template('admin_customers_list.html', 
              customers=c.list_customers())
      else:
          if cust_id.isdigit():
              cust_id = int(cust_id)
              c = customers.customer_details(customerid=cust_id)
              cust_data = c.retrieve_customer()
              if cust_data == None:
                  return error_message(message='No such customer.')
              else:
                  user = request.cookies['username']
  
  
                  if action == None:
                      s = scheduling.schedule(customer_id=cust_id)
                      return render_template('admin_customers_view.html')               
  
                  # file uploading 
                  # if the action is file_upload and required file is there
                  # upload it to the file server. 
                  # file url and relevent information should be store in the database
                  # files will be categorise for each customer from their ID.
  
                  elif action == 'file_uploading':
                      return redirect(url_for('main_admin_customers', 
                          cust_id=cust_id))
  
  
  
  
  
                   # Simple asset creation 
                  elif action == 'create_asset':
                      pass
  </code></pre>
  
  <p>However, I get the following error</p>
  
  <pre><code>Forbidden
  
  You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.
  </code></pre>
  
  <p>However, when I debug the code, as soon as I submit the form, I get the above error message. It didn't even hit the break points at <code>main_admin_customers</code>.</p>
  
  <p>What is the mistake I've done here?</p>