mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
updated to hide hidden fields in frontentmetadata, updated error responses
This commit is contained in:
@ -91,9 +91,13 @@ public class QFrontendTableMetaData
|
|||||||
{
|
{
|
||||||
this.primaryKeyField = tableMetaData.getPrimaryKeyField();
|
this.primaryKeyField = tableMetaData.getPrimaryKeyField();
|
||||||
this.fields = new HashMap<>();
|
this.fields = new HashMap<>();
|
||||||
for(Map.Entry<String, QFieldMetaData> entry : tableMetaData.getFields().entrySet())
|
for(String fieldName : tableMetaData.getFields().keySet())
|
||||||
{
|
{
|
||||||
this.fields.put(entry.getKey(), new QFrontendFieldMetaData(entry.getValue()));
|
QFieldMetaData field = tableMetaData.getField(fieldName);
|
||||||
|
if(!field.getIsHidden())
|
||||||
|
{
|
||||||
|
this.fields.put(fieldName, new QFrontendFieldMetaData(field));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sections = tableMetaData.getSections();
|
this.sections = tableMetaData.getSections();
|
||||||
|
@ -1131,13 +1131,13 @@ public class QJavalinApiHandler
|
|||||||
{
|
{
|
||||||
if(e instanceof QAuthenticationException)
|
if(e instanceof QAuthenticationException)
|
||||||
{
|
{
|
||||||
respondWithError(context, HttpStatus.Code.UNAUTHORIZED, e.getMessage(), apiLog); // 401
|
respondWithError(context, HttpStatus.Code.UNAUTHORIZED, "The required authentication credentials were missing or invalid.", apiLog); // 401
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(e instanceof QPermissionDeniedException)
|
if(e instanceof QPermissionDeniedException)
|
||||||
{
|
{
|
||||||
respondWithError(context, HttpStatus.Code.FORBIDDEN, e.getMessage(), apiLog); // 403
|
respondWithError(context, HttpStatus.Code.FORBIDDEN, "You do not have permission to access the requested resource.", apiLog); // 403
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user