Download the PHP package ipunkt/permissions without Composer

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

ipunkt/permissions

Check your permissions with a simple 1-liner: $user->can('do something', $onAnObject)

About

The goal of this package is to extract your permission checking code from both your controller and your model. Instead, each Model brings its own PermissionChecker object which then does the permission checking.

Install

Installation

Add to your composer.json following lines

"require": {
    "ipunkt/permissions": "dev-master"
}

Configuration

Add

'Ipunkt\Permissions\PermissionsServiceProvider'

to your service provider list

Use

Have your Usermodel implement CanInterface and use CanTrait Have the Models you with to perform permission checks on implement HasPermissionInterface and use HasPermissionTrait

This will allow you to do $user->can('doSomething', $model);

Simple use

Pull in another package which handles permission management and set permissions through is.

Known packages which have ipunkt/permissions support out of the box:

Dynamic Permissions

Usualy, you do not want to create an individual role and permission per user to edit their own profile, even if you have a system to do so. To address this, you can switch out the PermissionChecker object for your models.

Why the CanTrait

The actual work of this package is done in the PermissionChecker, and finding the right PermissionChecker is done in the HasPermissionTrait. So why go the detour of $user->can('something', $onSomething) instead of directly using $onSomething->checkPermission($user, 'something');?


All versions of permissions with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 4.*
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 ipunkt/permissions contains the following files

Loading the files please wait ....