Download the PHP package tobento/acl without Composer

On this page you can find all versions of the php package tobento/acl. 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 acl

ACL Service

The ACL Service is a simple role and user-level access control system.

Table of Contents

Getting started

Add the latest version of the Acl service running this command.

Requirements

Highlights

Simple Example

Here is a simple example of how to use the Acl service.

Documentation

Rules

Adding and getting rules.

Default Rule

The default rule has the following permission behaviour:

Areas bahviour:

Default Rule Custom

You can easily add a custom handler for extending a specific rule behaviour.

Custom Rules

You can easily add a custom rule for a different permission strategy.

Your Rule must implement the following RuleInterface.

Lets make a custum rule for just letting user specific permissions have access ignoring acl and role permissions.

Permissions

The following methods are available on objects implementing the Permissionable Interface or the Authorizable Interface.

Available methods for checking permissions on acl:

Checking permissions on Authorizable object:

For more information on Helper Function visit tobento/helper-function

Roles

Working with roles.

Trust Scope

Use the AclTrustScope to temporarily run code with a trusted user and a set of permissions, for example for seeding, tests or background jobs which are not triggered by a user request. When the scope ends, the previous permissions and current user are restored.

Make sure the scope is always ended, even if the trusted code throws:

Configuring the scope

Each method returns a new instance, leaving the original unchanged. Configure the scope before calling start().

Method Description
The trusted user which becomes the current user while the scope is active. If not set, the current user is kept.
The permissions to grant. If not set, every rule key known at start() is granted (full trust).
A callback receiving the Acl, run on start() to configure it, for example to add rules. May be called multiple times, the callbacks run in the order they were added.

Granting specific permissions only

Configuring the Acl

The callbacks run before the permissions are granted, so rules added by them are included when all rule keys are granted.

Good to know

Credits


All versions of acl with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
tobento/service-helper-function Version ^2.0
psr/container Version ^2.0
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 tobento/acl contains the following files

Loading the files please wait ...