Personal access to the files on the site made on MODx

Objective: CMS Is MODx Revolution. Among all the registered users on the website have a user name 13335. For it uploaded a file that should not see no one but him.

Solution:

1) Create a resource group.

Security - > resource Groups - > Create a resource group.
Name: 13335;
The default contexts web;
Put a Daw "to Create a parallel user group". It is obvious what will happen.
Then from the right column of all our resources, select those that need to see the user and drag the mouse in the left hand column, our new resource group.

2) Create a personal account resource 13335:

For example:



The content of the resource type

[[!FileLister? &path=`assets/files/patch/13335`]]

Indicating that there will be a link to the folder. It is just the file we need.
On the tab resource Groups add a resource group "13335".

3) Create a user group.

Security> access Control> user Group. Since we put a Daw "to Create a parallel user group", then we already have it. Have to check and fields to fill out. Call the context menu, choose "Edit user group".

Tab "General information".
Name: 13335;
Parent group: 0;
Panel: Default.

Tab "Users".
Add to the group already existing user 13335.
The role specified — Member-9999

Tab "Access contexts".
Add a new context:
Context: the web.
Minimum role: Member — 9999;
Access policy: Context.

Tab "Access resource group".
Add already created a resource group 13335.

The idea is all.

I read and tried to understand all of the this, this and books Shpak on web development tools MODx. Based on the reading done at random and all methods of trial and error.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Why I left Google Zurich

2000 3000 icons ready — become a sponsor! (the table of orders)

New web-interface for statistics and listen to the calls for IP PBX Asterisk