PHPackages                             luyadev/luya-module-frontendgroup - 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. luyadev/luya-module-frontendgroup

ActiveLuya-module[Authentication &amp; Authorization](/categories/authentication)

luyadev/luya-module-frontendgroup
=================================

Provide the ability to allow cms pages for specific user groups.

1.0.0(8y ago)03592MITPHP

Since Apr 21Pushed 4y ago2 watchersCompare

[ Source](https://github.com/luyadev/luya-module-frontendgroup)[ Packagist](https://packagist.org/packages/luyadev/luya-module-frontendgroup)[ Docs](http://luya.io)[ RSS](/packages/luyadev-luya-module-frontendgroup/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (9)Used By (0)

 [![LUYA Logo](https://raw.githubusercontent.com/luyadev/luya/master/docs/logo/luya-logo-0.2x.png)](https://raw.githubusercontent.com/luyadev/luya/master/docs/logo/luya-logo-0.2x.png)

Frontend User Group Module
==========================

[](#frontend-user-group-module)

[![LUYA](https://camo.githubusercontent.com/c30b61934591d3a6fcb8718a93fd61bf840c0abd8a8d49aa0fdd4ab99567bdf4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f776572656425323062792d4c5559412d627269676874677265656e2e737667)](https://luya.io)[![Latest Stable Version](https://camo.githubusercontent.com/728bed78e547588cb64f276392f8fc3d79c7acaa07c1c56ac671581d2379bbb6/68747470733a2f2f706f7365722e707567782e6f72672f6c7579616465762f6c7579612d6d6f64756c652d66726f6e74656e6467726f75702f762f737461626c65)](https://packagist.org/packages/luyadev/luya-module-frontendgroup)[![Total Downloads](https://camo.githubusercontent.com/6617a072d7350756c5907f682af74e878bb9984e09e9dcf511bb11058f4756b3/68747470733a2f2f706f7365722e707567782e6f72672f6c7579616465762f6c7579612d6d6f64756c652d66726f6e74656e6467726f75702f646f776e6c6f616473)](https://packagist.org/packages/luyadev/luya-module-frontendgroup)[![Slack Support](https://camo.githubusercontent.com/3574a291a5d77f541be2a9aebff47cf60ed44274b70f9d90bdf6d0d7f4911892/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d6c7579616465762d79656c6c6f77677265656e2e737667)](https://slack.luya.io/)

The main purpose of this module to provide the ability to allow cms pages for specific user groups. This can also be only one group with one users or different users in the same group or different groups with different users.

Installation
------------

[](#installation)

For the installation of modules Composer is required

```
composer require luyadev/luya-module-frontendgroup
```

### Configuration

[](#configuration)

After adding to your composer json you have to include the frontendgroup module into your Yii/LUYA config of your project and bootstrap the Module (otherwhise it can not catch the menu before item event).

```
'modules' => [
    // ...
    'frontendgroup' => [
        'class' => 'luya\frontendgroup\Module',
        'frontendUsers' => [
            'user1', 'user2', 'user3',
        ],
        'frontendGroups' => [
            'groupA', 'groupB',
        ],
    ],
],

'bootstrap' => [
    // ...
    'frontendgroup',
],

'components' => [

    // ...

    'user1' => [
        'class' => 'luya\web\GroupUser',
        'identityClass' => 'app\models\User1Class',
    ],
    'user2' => [
        'class' => 'luya\web\GroupUser',
        'identityClass' => 'app\models\User2Class',
    ],
    'user3' => [
        'class' => 'luya\web\GroupUser',
        'identityClass' => 'app\models\User3Class',
    ],
]
```

The config above shows defines your configuration:

- In the module `frontendgroup` you have to define the different users which are allowed in your setup by `frontendUsers`. And you have to defined the available groups by using `frontendGroups`.
- The mentioned `frontendUsers` in the module must exists als component with the base class `luya\web\GroupUser` (this is a wrapper of yii\\web\\User).

The frontend users must follow the `GroupUserIdentityInterface`:

```
// GroupUserIdentityInterface implentation

class User1 extends \yii\db\ActiveRecord implements GroupUserIdentityInterface
{
    // ...

    public function authGroups()
    {
        return ['groupA', 'groupB'];
    }

    // ...
}
```

The the above user class of `User1` is now allowed to access all pages which are defined for `groupA` and `groupB`.

### Initialization

[](#initialization)

After successfully installation and configuration run the migrate, import and setup command to initialize the module in your project.

1.) Migrate your database.

```
./vendor/bin/luya migrate
```

2.) Import the module and migrations into your LUYA project.

```
./vendor/bin/luya import
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~85 days

Recently: every ~114 days

Total

8

Last Release

3122d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86184bf08843ed8fcc4aedb2fdecd8a9e832e47e89a7166cebfda529c176f5ce?d=identicon)[nadar](/maintainers/nadar)

---

Top Contributors

[![nadar](https://avatars.githubusercontent.com/u/3417221?v=4)](https://github.com/nadar "nadar (36 commits)")[![dev7ch](https://avatars.githubusercontent.com/u/15183757?v=4)](https://github.com/dev7ch "dev7ch (3 commits)")[![hbugdoll](https://avatars.githubusercontent.com/u/6715827?v=4)](https://github.com/hbugdoll "hbugdoll (1 commits)")

---

Tags

phpauthorizationyii2moduleyiifrontendluyaluya-modulegroupfrontendusersusergroups

### Embed Badge

![Health badge](/badges/luyadev-luya-module-frontendgroup/health.svg)

```
[![Health](https://phpackages.com/badges/luyadev-luya-module-frontendgroup/health.svg)](https://phpackages.com/packages/luyadev-luya-module-frontendgroup)
```

###  Alternatives

[luyadev/luya-module-cms

The LUYA CMS module provides a full functional Content Management System for adding contents based on blocks.

32178.4k18](/packages/luyadev-luya-module-cms)[luyadev/luya-bootstrap4

Bootstrap4 Assets and Helper classes like ActiveForm for LUYA and Yii2.

1844.6k3](/packages/luyadev-luya-bootstrap4)

PHPackages © 2026

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