#1 2014-02-19 15:11:39

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

405 - method not allowed

I am calling the mORMot from an javascript front end.
I suspect there is an issue with array of TSQLRecordClass index 1 and 2.
for example:
http://127.0.0.1:8080/root/Customers?SE … 03a52795b2
http://127.0.0.1:8080/root/Employees?SE … 030b4a05ea
http://127.0.0.1:8080/root/Shippers?SEL … 0387defe1e
http://127.0.0.1:8080/root/Orders?SELEC … 03d5603b2d
http://127.0.0.1:8080/root/Categories?S … 038b663370
http://127.0.0.1:8080/root/Suppliers?SE … 0394e85776
http://127.0.0.1:8080/root/Products?SEL … 0381939a1d
http://127.0.0.1:8080/root/OrderDetails … 039aab0a4a
http://127.0.0.1:8080/root/SampleRecord … 03489bce87
http://127.0.0.1:8080/root/SampleDetail … 039046f5dd

  Model := TSQLModel.Create([	
  TSQLCustomers,	 
  TSQLEmployees,	-> 405 not allowed
  TSQLShippers,	-> 405 not allowed
  TSQLOrders,	
  TSQLCategories,	
  TSQLSuppliers,	
  TSQLProducts,	
  TSQLOrderDetails,	
  TSQLSampleRecord,	
  TSQLSampleDetail
],'root');	

if I change to

[
  TSQLCustomers,
  TSQLEmployees,--> 405 not allowed
  TSQLShippers, --> 405 not allowed
  TSQLOrders,
  TSQLCategories,
  TSQLSuppliers,
  TSQLProducts,
  TSQLOrderDetails,
  TSQLSampleRecord,
  TSQLSampleDetail
]

 [
  TSQLEmployees,
  TSQLShippers,   ---> 405 not allowed
  TSQLCustomers, ---> 405 not allowed
  TSQLOrders,
  TSQLCategories,
  TSQLSuppliers,
  TSQLProducts,
  TSQLOrderDetails,
  TSQLSampleRecord,
  TSQLSampleDetail
]

[
  TSQLSampleDetail,
  TSQLSampleRecord, ---> 405 not allowed
  TSQLOrderDetails,---> 405 not allowed
  TSQLEmployees,
  TSQLShippers,
  TSQLCustomers,
  TSQLOrders,
  TSQLCategories,
  TSQLSuppliers,
  TSQLProducts
]

[
  TSQLCustomers,
  TSQLEmployees,---> 405 not allowed
  TSQLShippers,---> 405 not allowed
  TSQLOrders
]

[
  TSQLCustomers,
  TSQLEmployees---> 405 not allowed
]

[
  TSQLEmployees,
  TSQLCustomers---> 405 not allowed
]

Does anyone have any ideas why I'm getting the 405 error?

Offline

#2 2014-02-19 16:09:09

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: 405 - method not allowed

I guess TSQLCustomers and TSQLShippers have a special definition...

Or could you try to add explicitly TSQLAuthUser and TSQLAuthGroup to the model?
They should be there since you need authentication.

Offline

#3 2014-02-19 18:31:25

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Re: 405 - method not allowed

Yeah. If I include TSQLAuthUser, TSQLAuthGroup...

  [
  TSQLCustomers,
  TSQLAuthUser,     //<-- 405  INDEX 1
  TSQLAuthGroup,   //<-- 405  INDEX 2
  TSQLEmployees,
  TSQLShippers,
  TSQLOrders,
  TSQLCategories,
  TSQLSuppliers,
  TSQLProducts,
  TSQLOrderDetails,
  TSQLSampleRecord,
  TSQLSampleDetail
]

it will return 200 for all tables except for AuthUser and AuthGroup.

Last edited by warleyalex (2014-02-19 21:19:38)

Offline

#4 2014-02-19 18:51:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: 405 - method not allowed

This is the default settings or per-table access rights.
Please ensure you understand how TSQLAccessRights works in the framework.

Offline

Board footer

Powered by FluxBB