rejetto forum

General => Everything else => Topic started by: adminparsa on March 28, 2021, 05:04:10 PM

Title: permission
Post by: adminparsa on March 28, 2021, 05:04:10 PM
I want when I define on an access folder
The rest of the users can only see the list of that folder and upload, but fail to download or erase the rest of the contents
please help me !
Title: Re: permission
Post by: danny on March 28, 2021, 07:59:13 PM
fail to erase is default rights for virtual file system, and this can be repurposed as fail to delete + fail to download, simply by making download action check for delete rights (if no delete rights then no download). 

Here's Naitlee's white.tpl modified with
[+special:alias|cache]
admz={.if|{.get|can delete.}|{:<a href="%item-name%">%item-name%</a>:}|{:%item-name%:}.}

and the file list uses {.admz.} instead of href clickable links. 

But, you'd also need events file http://rejetto.com/wiki/index.php?title=HFS:_Event_scripts
press altF6 to edit events file, and put this in
[download]
{.if|{.get|!can delete.}|{:{.disconnect.}:}.}

Edit:
upnotdown_for_HFS2.4RC.tpl is modified white.tpl
upnotdown2_for_HFS2.4RC.tpl is modified stripes.tpl
Title: Re: permission
Post by: Mars on March 28, 2021, 08:56:09 PM
Forget what Danny says,

 it's not the right way to always want to put everything in the template or in events or to use javascript,

 hfs already has a large amount of technical possibilities to satisfy a lot of situations

1) your folder must first be added to VFS as real folder

2) right click on it to access its properties on the "FLAGS" tab

3) check browsable and no download

4) go to the "PERMISSIONS" tab? then the "UPLOAD" sub-tab and check Anyone if you accept that anyone can upload a file in the directory, otherwise check "Any account" if you want only logged in people to be able to uplode

5) to allow you to keep management access, go to the "DELETE" sub-tab and check your username, this will give you additional command buttons on the web page

as it is, the contents of the directory will be visible to any user, this amounts to the same if in the "ACCESS" sub-tab is checked "Anayone", otherwise in this tab by checking "Any account", only authenticated users will be able to see it. the contents
Title: Re: permission
Post by: danny on March 30, 2021, 04:36:10 AM
Thanks Mars! 

Good to know that the feature was already built-in. 
Title: Re: permission
Post by: Mars on March 30, 2021, 11:05:09 AM
Thanks Mars! 

Good to know that the feature was already built-in.

This is what happens when we skip school during basic HFS lessons, we don't know how it works,
the next time you start again you will be deprived of dessert for 1 week  ;D ;D