Set Permissions in Custom Module I am writing a custom module for my Drupal 7 site. I have added the code to enable a configure form. 

I want to restrict the config to admin users only, and some of the functions to another group of users. How do I go about doing this?

Any and all help greatly appreciated.
You can use hook_permission() in your module. This allows you to add a custom permission. For example: 

return array(
  'your permission name' =&gt; array(
    'title' =&gt; t('your permission title'),
    'description' =&gt; t('Description.'),
  ),
);


Afterwards, go to the permission page and set the ticks where you need them.