You do this in the `_isAvailable` method you implemented in your command Javascript, optionally you can also do this in the `_isEnabled` method.

In there you will have to check what Group the User belongs to. To get the current uUser and its Groups you can use the following:

<!-- language: lang-js -->

    var settings = Tridion.UI.UserSettings.getJsonUserSettings(true);
    if (settings)
    {
        var groups = settings.User.Data.GroupMemberships;
    }


Now the `groups` parameter will be be an object array containing the Groups the current User belongs to, they are formatted as JSON with a `type`, `title` and `href` (the TCMURI).