Download the PHP package xiidea/ezrbac without Composer

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

ezRbac

A simple yet easy to implement Role Based Access Control Library for popular PHP framework Codeigniter

Key Features

Current Stable Release

v1.3.2 Released!

How To Install

Installation of this library is simple 4 steps

  1. Put ezRbac in the third_party Directory of your application (or use composer command)

  2. Run the SQL in schema directory or create three tables in your database manually.

  3. Set $config['enable_hooks'] = TRUE; at ./application/config/config.php

  4. Set $config['encryption_key'] = SOME_SECRET_KEY; at ./application/config/config.php

  5. Add a hook in ./application/config/hooks.php

Map custom actions to access map

Define a public function named access_map in your controller something like bellow:

The index of the array is the actual action name, and the value mapped to the access privileges configured as $config['default_access_map'] = array("view", "create", "edit", "delete", "publish")

Default credential

If you have imported the provided data.sql then the default credential is

user:       [email protected]
password:   123456

ezRbac Specific URL

logout url : /index.php/welcome/index/rbac/logout

acl manage url : /index.php/welcome/index/rbac/gui

If you have enabled the routing(see How to eneable Routing) then you can access all url like /rbac/(logout|gui)

How to enable Routing

Its easy to enable with 2 steps

  1. Set $config['use_routing'] = true; at ./ezRbac/config/ez_rbac.php

  2. set $route['^(rbac)/(.+)$'] = $route['default_controller']."/index/$1/$2"; at /application/config/routes.php (where rbac can be replaced whatever you like by setting the $config['ezrbac_url'] = 'rbac'; )

Customization

Most of the customization can be done through setting configuration values. you can customize configuration in two ways:

  1. (The Easy way) Modify the configuration to match with your choice at ./third_party/ezRbac/config/ez_rbac.php
  2. (The Advanced way) Make a copy of ./third_party/ezRbac/config/ez_rbac.php as ./application/config/ez_rbac.php or Create new file to override the default settings. These way whenever you do update the library, you do not need to worry about your configuration values.

You can override the view file also. just copy the view files into /application/views/ezrbac/ and modify as per your need. Currently only views in login directory is extensible.

Configuration Options

The database field map for your existing system. Helpful to adapt your db without modifying the code!!

The database field map for your existing system. Helpful to adapt your db without modifying the code!!

Dependencies

To use this library you need Codeigniter 3.0+ For older version use 2.x branch


All versions of ezrbac with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
composer/installers Version *
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 xiidea/ezrbac contains the following files

Loading the files please wait ....