Hide (or disable) an entry field in CP depending on user group permission? So I am trying to hide (or disable) a field in the "Edit Entry" view in the CP.  

I know how to test a user group :
{% if currentUser.isInGroup('groupHandle') %}  

But I cannot find a hook in Craft Doc to change the rendering of my field ?
Perhaps with getInputHtml()? But I dont understand exactly how...
OK so here is my solution :
1/ define a custom permission for user groups

public function registerUserPermissions()
{
    return array(
        'updateTopNews' =&gt; array('label' =&gt; Craft::t('Update Top News')),
    );
}


2/ simply add css to hide the field when user has not the permission in my plugin init function

 public function init () {
    parent::init();

    $user = craft()-&gt;userSession-&gt;getUser();
    if ( craft()-&gt;request-&gt;isCpRequest() &amp;&amp; $user ) {

        if ( !$user-&gt;can('updateTopNews') ) {
            craft()-&gt;templates-&gt;includeCss('#fields-topNews-field { display: none; }');
        }
    }