Is there any way to manipulate feature.xml file to control its visibility from a specific group?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
this is not possible, when you deploy a feature its deployed to the whole web application and is visible to all sites be it site collection feature or site feature. There is no way to hide the feature based on groups/users access rights.
The solution that i can think of would be to create a hidden feature, this would then look at the current feature page (_layouts/ManageFeatures.aspx) its activated on, it would then check the user groups for the site. If users are within a custom group then they have access otherwsie hide the feature.
Its not complex but its not easy by any means! to make it more user friendly once you have it working with hard coded checks within a loop you can then remove the hard coded check to look up on a list instead, within the list it would contain the feature titles. The JS code will send a query with the current item the loop is under to send to the list. if it exists than hide if it returns nothing than show! this would mean you can add any feature title to the list to hide rather than having to ammend the js code to add or remove features you want to hide or show!
sorry havent got any code as its long winded (code wise) and dont have the time atm.
just to clarifiy, the hidden feature is a container for the js code, its the js code that would be doing most of the working out. The feaure is there just to enable the js for that given site only when its enabled.