Skip to content

Commit

Permalink
Fix problem with changing username: update AccountEntity setPermissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Misterblue committed Nov 12, 2020
1 parent 6a8c2b0 commit fc4f646
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Entities/AccountEntity.ts
Expand Up @@ -114,7 +114,7 @@ export const accountFields: { [key: string]: FieldDefn } = {
entity_field: 'username',
request_field_name: 'username',
get_permissions: [ 'all' ],
set_permissions: [ 'none' ],
set_permissions: [ 'owner', 'admin' ],
validate: async (pField: FieldDefn, pEntity: Entity, pVal: any): Promise<ValidateResponse> => {
let validity: ValidateResponse;
if (typeof(pVal) === 'string') {
Expand Down Expand Up @@ -411,7 +411,7 @@ export const accountFields: { [key: string]: FieldDefn } = {
entity_field: 'timeOfLastHeartbeat',
request_field_name: 'time_of_last_heartbeat',
get_permissions: [ 'all' ],
set_permissions: [ 'none' ],
set_permissions: [ 'admin' ],
validate: isDateValidator,
setter: noSetter,
getter: dateStringGetter
Expand Down

0 comments on commit fc4f646

Please sign in to comment.