I have two content types: CTA and CTB. If a user from group A visits the page, I would like to hide CTB. If a user from group B visits the page, I would like to hide CTA. What is the best way to do this?
My way of doing it would probably involve a codebehind on the page, then in the codebehind I would do something like this (pseudocode):
SPWeb w = SPContext.Current.Web;
SPDocumentLibrary dl = GetLibraryByName(name);
dl.ContentType.Hidden = true;