The legacy wiki pages are here for reference purposes only.
For up-to-date information make sure to check the documentation section.

Returns a node-set of member groups (roles) that have access to the restricted content document.

umbraco.library:AllowedGroups(int documentId, string path)

An example of the returned XPathNodeIterator (as XML):

<roles>
	<role>1050</role>
	<role>1066</role>
	<role>1072</role>
</roles>

The value of the <role> are the Id of the Member Group.

Our.umbraco.org is the community mothership for Umbraco, the open source asp.net cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community.