We have a situation where we have two different roles of users: let's call them content_labourer
and content_boss
. There's a template we could call very_cool_content
. On this template we've stated the following attributes:
title
: some string valueapi_content_id
: an integer that accurately binds this content to some backend API content (we use this in our VeryCoolContentController to fire up some backend API stuff, obviously)description
: a text value
I want my content_boss
to be able to set the value for all these attributes. After all, he's the boss.
However, my content_labourer
is not privy to the whole API business and would never in a million years know which value he should enter there, let alone that he should even be able to enter/change the value of api_content_id
. He should also not be able to set the value of title
, because that's none of his business.
Now my question is: how do I protect these particular attributes from being changed by (or in the ideal case: even be visible to) users without the content_boss
role?