CityWebConsultants / Iris

Modular content management and web application framework built with Node.js and MongoDB
http://irisjs.org
Other
9 stars 7 forks source link

Further extend permissions for added flexibility #379

Closed adam-clarey closed 7 years ago

adam-clarey commented 7 years ago

Essentially, these alterations allow for custom logic during the entity edit render process to determine how the original page request responds.

if any hook fails throughout the process, this should filter all the way back up to the originally called hook so that it can respond in different ways.

In my particular use-case, we need custom logic to determine which individual users can edit individual entities which cannot be covered by the static core permissions. If the logic determines it can even though core perms say it cant then the entity form should render and submit. Equally, if core perms say it should but the logic says says it shouldn't then the 403 response should be sent.