Download the PHP package luyadev/luya-module-frontendgroup without Composer
On this page you can find all versions of the php package luyadev/luya-module-frontendgroup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download luyadev/luya-module-frontendgroup
More information about luyadev/luya-module-frontendgroup
Files in luyadev/luya-module-frontendgroup
Package luya-module-frontendgroup
Short Description Provide the ability to allow cms pages for specific user groups.
License MIT
Homepage http://luya.io
Informations about the package luya-module-frontendgroup
Frontend User Group Module
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
For the installation of modules Composer is required
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).
The config above shows defines your configuration:
- In the module
frontendgroup
you have to define the different users which are allowed in your setup byfrontendUsers
. And you have to defined the available groups by usingfrontendGroups
. - The mentioned
frontendUsers
in the module must exists als component with the base classluya\web\GroupUser
(this is a wrapper of yii\web\User).
The frontend users must follow the GroupUserIdentityInterface
:
The the above user class of User1
is now allowed to access all pages which are defined for groupA
and groupB
.
Initialization
After successfully installation and configuration run the migrate, import and setup command to initialize the module in your project.
1.) Migrate your database.
2.) Import the module and migrations into your LUYA project.