Skip to content

Commit

Permalink
Places: fix 'path' so it just returns the domain local address while
Browse files Browse the repository at this point in the history
    'address' returns the join of the domain's network address and the 'path'.
Disables setting PlaceEntity.address.
  • Loading branch information
Misterblue committed Jun 15, 2021
1 parent 1167362 commit a0b63aa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Entities/PlaceFields.ts
Expand Up @@ -141,7 +141,7 @@ export const placeFields: { [key: string]: FieldDefn } = {
entity_field: 'path',
request_field_name: 'address',
get_permissions: [ Perm.ALL ],
set_permissions: [ Perm.DOMAINACCESS, Perm.MANAGER, Perm.ADMIN ],
set_permissions: [ Perm.NONE ],
validate: isPathValidator,
setter: noSetter,
getter: async (pField: FieldDefn, pEntity: Entity): Promise<any> => {
Expand All @@ -155,9 +155,7 @@ export const placeFields: { [key: string]: FieldDefn } = {
set_permissions: [ Perm.DOMAINACCESS, Perm.MANAGER, Perm.ADMIN ],
validate: isPathValidator,
setter: simpleSetter,
getter: async (pField: FieldDefn, pEntity: Entity): Promise<any> => {
return Places.getAddressString(pEntity as PlaceEntity);
}
getter: simpleGetter
},
'maturity': {
entity_field: 'maturity',
Expand Down

0 comments on commit a0b63aa

Please sign in to comment.