Download the PHP package crazedsanity/permission without Composer

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

Permissions System

This is a generic permissions system. The idea is to programatically allow/deny access to anything based on user, group, and "other" permissions.

If you understand Linux filesystem permissions, you should understand this system intrisically. It is based upon that system.

This system denies access by default: if a request is made for which there is no rule, permission is denied. This is a pretty basic system, lacking formal tie-ins to other tables. This simplicity is by design: avoiding any unnecessary linkage to other tables ensures maximum usability with minimal barrier to entry.

How It Works

Basics

The thing that needs to have permissions assigned is stored in the object field. The user that owns it is assigned with the user_id field as an integer. The group that owns it is assigned with the group_id field as an integer. When requesting permission, the default is to deny: if no object matches the query, it is assumed that the permissions are 000.

There is no concept of parent/child relationships, so each object is considered a stand-alone entity. It should be fairly easy to extend this system to accomodate that concept.

Perms Field

The perms field is a number that indicates user, group, and other permissions, all together. So, given the value 321, the 3 indicates user permissions, the 2 indicates group permissions, and the 1 indicates other.

Values for these fields are as follows:

The allowed privileges are added together to show what is allowed and what isn't. The breakdown is as follows

So, to expand on that, you can read the following values as:

Order of Importance

It's somewhat important to know the order in which permissions are determined. So here it is.

  1. user: if the user_id matches, the first set of permissions (the left-most set) are used.
  2. group: if the group_id matches (and user_id does not), the group permissions are used.
  3. other: if neither user_id nor group_id match, the other permissions are used.

Example Usage

TODO: put in some examples.


All versions of permission with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
crazedsanity/bitwise Version ~0.1.3
crazedsanity/database Version ~0.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 crazedsanity/permission contains the following files

Loading the files please wait ...