Download the PHP package torqit/pimcore-role-creator-bundle without Composer

On this page you can find all versions of the php package torqit/pimcore-role-creator-bundle. 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 pimcore-role-creator-bundle

Pimcore Role Creator bundle

Getting started

  1. This bundle is easily installed via composer: composer require torqit/pimcore-role-creator-bundle
  2. In your config folder, add a roles.yaml file. Instructions on how to set up your roles is given below in the Roles Setup section.
  3. Make sure you register the RoleCreatorBundle in your AppKernel.php located at \src\pimcore-root\app\AppKernel.php. Registering the bundle is as easy as adding a line in the registerBundlesToCollection function, like so: $collection->addBundle(new \TorqIT\RoleCreatorBundle\RoleCreatorBundle);
  4. Run the bundle, with the command: ./bin/console torq:generate-roles

Role Setup

For this example, let's say we want to add Manager and Employee roles to our app. In your config folder, add a roles.yaml file with the following layout:

This will create Manager and Employee roles, both with no permissions, workspaces or allowed classes.

Basic Permissions

Using the permissions specified in the user_permission_definitions table, you can specify basic permissions per role using one of three variables:

So for example, if we wanted our manager to have full access to the app, but only allow users to see documents and assets, we would configure it like so:

Workspaces

You can specify data object, asset and document workspaces using the following structure per role.

Where folderName is the full path to the folder for that workspace. Each workspace array can be populated with the following currently supported permissions:

Note: in order to make the entire structure available, you can supply / as the folder, which will make a workspace at the root.

Going back to our example, if we wanted to make it so that the Employee role can only operate in the articles folders for documents and assets, we might set up our config this way:

Alternatively, you can pass true to a workspace, which will enable all of the permissions

You can specify special configurations per data object workspace:

Allowed Document Types & Classes

You can specify the allowed document types and classes per role using the following structure:

Where the both values accept the class/document type name (and not the class/doc type ID). For example, if we wanted to make it so that the Employee role could only create Article's, we would simply specify the following:

Note: The default behavior for pimcore is that if no allowed class/doc types are specified, then all classes and doc types are allowed. If you need to restrict all creation, you may need to configure it at the workspace level.

Allowed Perspectives

You can specify the allowed perspectives on a role by adding perspectives to an array of strings:

If you don't specify a list of perspectives, than it will clear all previously selected perspectives.


All versions of pimcore-role-creator-bundle with dependencies

PHP Build Version
Package Version
Requires pimcore/pimcore Version ^11.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 torqit/pimcore-role-creator-bundle contains the following files

Loading the files please wait ....