rejetto forum

permission

0 Members and 1 Guest are viewing this topic.

Offline adminparsa

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
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 !


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
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
« Last Edit: March 30, 2021, 05:06:32 AM by danny »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2062
    • View Profile
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


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
Thanks Mars! 

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


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2062
    • View Profile
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