Skip to content

Conversation

@jakerella
Copy link

I needed to be able to allow REST addition of properties on create, but disallow any update of those properties after creation. This PR implements a second value option for the "ReadOnly" mixin when specifying properties:

"mixins": {
  "ReadOnly": {
    "status": true,  // <-- ALWAYS read only from REST (all operations)
    "role": "createOnly"  // <-- can be set on creation from REST, but not updates from REST
  }
}

@prochac
Copy link

prochac commented Feb 7, 2018

should by extended to whiteListed methods
ex.
ReadOnly: {
email: {
writableBy: ['create', 'prototype.patchAttributes']
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants