PHPackages                             fontis/customergroupaccess-mage2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. fontis/customergroupaccess-mage2

AbandonedArchivedMagento2-library[Authentication &amp; Authorization](/categories/authentication)

fontis/customergroupaccess-mage2
================================

Provides a convenience class for implementing customer group based access in your Magento 2 extension.

1.0.6(5y ago)48.0k7OSL-3.0PHPPHP ~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0

Since Jan 22Pushed 5y ago12 watchersCompare

[ Source](https://github.com/fontis/customergroupaccess-mage2)[ Packagist](https://packagist.org/packages/fontis/customergroupaccess-mage2)[ RSS](/packages/fontis-customergroupaccess-mage2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (8)Used By (0)

Fontis Magento 2 Customer Group Access
======================================

[](#fontis-magento-2-customer-group-access)

This is a standalone package designed to help extensions limit access to functionality such as payment methods to certain customer groups.

This is **NOT** a Magento 2 extension. It will not do anything by itself. It is intended for developers to use while implementing extensions.

The recommended way to install this package is to make your extension depend on this package in its `composer.json` file. To do so, add the following line to the `require` section of the file:

```
{
    ...
    "require": {
        ...
        "fontis/customergroupaccess-mage2": "1.0.*",
        ...
    },
    ...
}

```

Once you've added this package as a dependency, follow these instructions for actually using the package within your extension:

1. Add two settings to your system.xml file, using the relevant source models:

- This `customer_group_access` with `Fontis\CustomerGroupAccess\Source\CustomerGroupAccess`
- That `customer_group` with `Fontis\CustomerGroupAccess\Source\CustomerGroup`

2. In your `di.xml` file, define a `virtualType`. The `configPathPrefix` should be the section and group IDs that contain the settings you added above.

    ```

            my_settings_section/my_settings_group

    ```

    Using this example, the full path to one of the settings would be like so:

    ```
    my_settings_section/my_settings_group/customer_group_access

    ```
3. Use the virtualType to configure the model where your access checks need to be performed:

    ```

            myModuleMyFeatureCustomerGroupAccessCheckFactory

    ```
4. In your model's constructor, accept this class as one of the arguments:

    ```
    Fontis\CustomerGroupAccess\AccessCheckFactory

    ```
5. When you actually need to perform the access check, use the factory to create an instance of the access check class. If you need to perform the check in the context of a store that isn't the current store, you'll need to pass in a store ID:

    ```
    $accessCheck = $this->accessCheckFactory->create(array("storeId" => $this->getStore()));
    ```
6. Perform the check by calling the `check()` method and passing it a customer group ID. If it returns true, they're allowed to use whatever it is you're offering. If it returns false, they aren't. Simple!

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~308 days

Recently: every ~234 days

Total

7

Last Release

1908d ago

PHP version history (4 changes)1.0.0PHP ~5.6.0|~7.0.0

1.0.2PHP ~5.6.0|~7.0.0|~7.1.0

1.0.3PHP ~5.6.0|~7.0.0|~7.1.0|~7.2.0

1.0.5PHP ~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/05d774e99d5cf1668b5ac261550d18ea50f3699c930e13e87a24ad39a31afbef?d=identicon)[fontis](/maintainers/fontis)

---

Top Contributors

[![chnorton](https://avatars.githubusercontent.com/u/1308501?v=4)](https://github.com/chnorton "chnorton (5 commits)")[![arivazhaganark](https://avatars.githubusercontent.com/u/10572131?v=4)](https://github.com/arivazhaganark "arivazhaganark (1 commits)")

### Embed Badge

![Health badge](/badges/fontis-customergroupaccess-mage2/health.svg)

```
[![Health](https://phpackages.com/badges/fontis-customergroupaccess-mage2/health.svg)](https://phpackages.com/packages/fontis-customergroupaccess-mage2)
```

###  Alternatives

[bitexpert/magento2-force-customer-login

The Force Login module for Magento2 redirects a storefront visitor to the Magento2 Frontend login page, if the visitor is not logged in. It is possible to configure the whitelisted urls to add custom definitions.

171409.9k](/packages/bitexpert-magento2-force-customer-login)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[swissup/module-search-mysql-legacy

Legacy mysql search for magento 2.4

10483.0k](/packages/swissup-module-search-mysql-legacy)[hryvinskyi/magento2-invisible-captcha

Magento 2 Google Invisible Captcha (Recaptcha) module

279.4k](/packages/hryvinskyi-magento2-invisible-captcha)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

126.8k](/packages/mage-os-module-inventory-reservations-grid)[loki/magento2-admin-components

N/A

151.6k5](/packages/loki-magento2-admin-components)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
