#326

Product support

Visit this product's website for support.

Categories

  • Utility

You will be able, for example, to create levels of administrators like Chief Editors and Editors to your RainLab.Blog where Chief Editors can create Editors and see their posts as their childrens posts, but without seeing their siblings posts or siblings Editors posts.

Backend User Tree

Adds SimpleTree trait functionality to backend users (administrators) thought a Proxy model.

Why?

You will be able, for example, to create levels of administrators like Chief Editors and Editors to your RainLab.Blog where Chief Editors can create Editors and see their posts as their childrens posts, but without seeing their siblings posts or siblings Editors posts.

This can be used for whatever Model you want. Just applying the following code to listExtendQueryBefore hook:

$query->whereIn('user_id', $this->user->getAllChildrenIdList());

Where user_id is the foreign key on the model to represent the user who created it. This can be archived using beforeSave hook, adding the current logged in user to the model:

$model->user = BackendAuth::getUser();
// or
$model->user = $this->user;

Don't forget to add user to belongsTo property equals to Backend\Models\User in the models that needs ownership. It's a basic Eloquent relation.

Permissions

Users will be able to define permissions to their children based on their own permissions.

  • Found the plugin useful on 11 Jul, 2017

    array_keys() expects parameter 1 to be array, string given ..../plugins/leocavalcante/backendusertree/formwidgets/PermissionEditor.php line 12

    some bugs..

1.0.3

Fix Github issue #2

Jun 06, 2016

1.0.2

Creates proxies table

May 31, 2016

1.0.1

First version of BackendUserTree

May 31, 2016