Download the PHP package thelia/customer-group-acl-module without Composer

On this page you can find all versions of the php package thelia/customer-group-acl-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package customer-group-acl-module

CustomerGroupAcl

Extends the CustomerGroup module with an access control list mechanism that can be used to allow or deny access to some resource to a customer group.

Installation

Manually

Composer

Add it in your main Thelia composer.json file

 Update

0.1.3

Execute setup/update-0.1.2-0.1.3.sql script.

Configuration

Using the configuration file

Modules that use customer group ACLs must define them in the acl.xml file in the module configuration directory. The ACLs will be created when the module is activated.

Since ACLs are applied to customer group, you must have already have created some in order to use them (see the CustomerGroup module documentation). In this exemple, we will assume that the client, vip, also-vip-1 and also-vip-2 groups exists.

Here we define an ACL resource vip-perks and grant VIEW type access to this resource to the vip group. The extra-vip-1 group is set to have the same accesses as the vip group. The extra-vip-2 group is also set to have the same rights as the vip group, but only for the vip-perks ACL resource.

Using the back office

ACLs and group accesses can also be configured in the Thelia back office. A link to the configuration page is available in the Tools menu.

Access types

The available access types are defined in the Thelia access manager:

Additionally, the ALL access can be used to grant all available accesses.

Check group access

PHP

The customer_group_acl.tool can be used to check ACL access.

Smarty

Smarty plugins are provided to check ACL access in templates.

As with the PHP function, you can check multiple resources and accesses at once, and optionally require only one access.

Simple check

The check_acl function will throw an exception if the required access(es) are not granted.

Block check

The acl and elseacl tags can also be used to check ACL accesses with a block syntax.

Loop

acl

This loop list ACLs.

Input arguments

Argument Description
id Id or list of ACL ids.
module Id or list of module ids.
code Code or list of ACL codes.
order Order of the results.
lang Locale of the results.

order can be one of:

Output arguments

Variable Description
$ACL_ID ACL id.
$MODULE_ID Id of the module defining the ACL.
$CODE ACL code.
$TITLE ACL title in the selected locale.
$DESCRIPTION ACL description in the selected locale.

customer-group-acl

This loop list customer group access grants.

Input arguments

Argument Description
acl Id or list of ACL ids.
customer_group Id or list of customer group ids.
acl_type Access type or list of access types.
activate Whether to only list active access grants (true) or not (false) or both (*).

Output arguments

Variable Description
$ACL_ID ACL id.
$CUSTOMER_GROUP_ID Customer group id.
$TYPE Access type.
$ACTIVATE Whether the access grant is active.

All versions of customer-group-acl-module with dependencies

PHP Build Version
Package Version
Requires thelia/installer Version ~1.0
thelia/customer-group-module Version ~0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thelia/customer-group-acl-module contains the following files

Loading the files please wait ....