Conditional Fields is a great Drupal module for conditionally hiding CCK fields.
Unfortunately, it can't hide CCK fieldgroups. It's also not ideal if you're concerned about security— it simply hides fields; it doesn't deny access. A recent project of mine required that I conditionally deny access to field groups, so I decided to implement a programmatic solution.
In this case, I needed to deny access to specific fieldgroups in content type 'company' based on:
- The role of the acting user
- The value of the field_company_type CCK field
The downside to this approach is that you must save and return to the node edit page before seeing a change in fieldgroup visibility.
Here's my solution: