I have some fields in MB I want to make viewable for everyone, but only editable for a certain group users (either defined by the role or the capabilities).
As I see it, I now has two possibilities:
1) Set the fields as disabled and readonly if they don't have the required permissions. The downside of it is it's make in the frontend, and is not validated server-sided, so the visitors can alter the data before the data is sent to server, thus making the solution unreliable.
2) I can use the exclude/include plugin and make the meta boxes disappearing on PHP-side - and alterate between a 'custom_html' field and some real input fields, depending upon the current user. But it exclude/include plugin only works on the whole meta box and not each fields. Or I can build a custom solution which checks the permission and returns the correct field, but it would take a lot work and mess the code yet further up.
I want to suggest to implement a attribute to all fields, to remove any way to inputting something, and maybe change the type to plain text if set to true. Thus, a feature alike "disabled" or "readonly" - but it would just change the whole field to text if set to true.
Is it possible, and something you would like to implement?