U
U
Uncle_Goodwin2013-05-20 12:51:22
MODX
Uncle_Goodwin, 2013-05-20 12:51:22

Personal access to files on the site?

The situation is this.
There is a personal account with access for registered users to directories with files. Implemented via FileLister. Those. all users, having logged into their personal account, see files from the specified directory. But it is necessary to make personal access to files. 1 user - 1 file so that he does not see the files of other users. Tell me, please, how can I do it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
U
Uncle_Goodwin, 2013-07-16
@Uncle_Goodwin

Solved this problem

Z
zednight, 2013-05-20
@zednight

You can make a script that, based on authorization, will give a file with content, and if there are not enough rights, then give an empty file. There are many variations, you can use not many files, but for example their identifiers and one script, such as: script.php?file=key_for_file, you can create files with keys inside. Well and the rights to implement on the basis of a DB.
PS You can try to implement on the basis of unix rights, but there will be too close integration with the system, it seems to me that this is not worth doing for a public site.

S
Stepan, 2013-05-20
@L3n1n

I don't know how your FileLister works, but... Is
creating a folder for each user not an option?
We take md5 (userid) and create a 3-level folder. In FileLister we pass the address of this folder.
The rights to exercise I think will not be a problem.
This is, of course, if it's customized for you.
The best option would be to store files as you like, and issue them only depending on authorization.

V
Vadim, 2013-05-20
@Kpblc

I join the question, I am also busy with a project in which this feature is extremely necessary.
But I have an assumption that should be obtained through separation by contexts ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question