Download the PHP package unstoppablecarl/arbiter without Composer

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

Arbiter

Manage Laravel User abilities that target Users.

Source Code Latest Version Software License Build Status Coverage Status Total Downloads

About

Determining a way to authorize what actions can be performed by one User on another may seem like a simple problem at first. Most Role based permission modules are designed to allow multiple roles per user. This is an extremely powerful and flexible design pattern but creates a hard to define authorization case: When User-A can update users with Role-1, and User-B has Role-1 and Role-2, how should your application determine if User-A update User-B?

Arbiter provides a solution to this problem without getting in the way of an existing or separate multi-role based authorization system.

Requirements

Installation

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

Overview

Each User has exactly one Primary Role. Primary Roles are used to determine what actions a user can perform on other users and vice-versa. Each Primary Role is identified with a unique name string.

The UserWithPrimaryRole interface is implemented on the User model.

The developer implements the interface with a strategy for determining what the Primary Role of a user is.

Primary Role Implementation Strategies

Basic Usage

User

Implement the UserWithPrimaryRole Interface on your User model.

See UnstoppableCarl\Arbiter\Contracts\UserWithPrimaryRole

User Policy

Create App\Policies\UserPolicy and set it as the policy for the User model in App\Providers\AuthServiceProvider

See UserPolicy

User Authority

Create and bind an implementation of the UserAuthorityContract in your AuthServiceProvider or continue with the Config Based User Authority below.

Config Based Implementation

Arbiter includes a simple config based UserAuthority implementation to quickly get your project up and running.

ArbiterServiceProvider

Add the Service Provider to config/app.php

UnstoppableCarl\Arbiter\Providers\ArbiterServiceProvider::class,

Configure

Publish the config file.

php artisan vendor:publish --provider=UnstoppableCarl\Arbiter\Providers\ArbiterServiceProvider

Primary Role Abilities can be configured in config/arbiter.php.

Customizing The User Policy

The UserPolicy functionality is organized into seperate traits to allow use of only the functionality you want.

UserPolicy Trait: HasUserAuthority

HasUserAuthority

Adds a reference to the UserAuthority instance.

Trait: HasAbilities

HasAbilities

Adds the typical abilities of a UserPolicy matching them to the methods and abilities of the UserAuthority.

Trait: HasGetters

HasGetters

Adds getters to allow retrieval of all primary roles a user can perform given abilities on.

Trait: HasTargetSelfOverrides

HasTargetSelfOverrides

Allows overriding the returned value of a UserPolicy ability check, when the source and target of the check are the same User. The ability check is overriden by using the before method behavior of Laravel Policies.

Adding User Authority Abilities

The following shows how to add an ability to the UserPolicy that checks a custom ability set in the UserAuthority.

Running Tests

Run Unit Tests

Run Codesniffer (psr-2)

Run both

Contributing

Contributions and Pull Requests welcome!

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details


All versions of arbiter with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
illuminate/contracts Version 5.4.* || 5.5.* || 5.6.*
illuminate/support Version 5.4.* || 5.5.* || 5.6.*
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 unstoppablecarl/arbiter contains the following files

Loading the files please wait ....