rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: gogi1000 on September 21, 2016, 07:21:18 AM

Title: uploading file just from parent location
Post by: gogi1000 on September 21, 2016, 07:21:18 AM
i have a question. how i enable that my users which permission for uploading can uploading just from parent location, not when go to subfolder?
structure of virtual file sistem is

parent folder (can upload)
  subfolder (cannot upload, for example hide upload button)
Title: Re: uploading file just from parent location
Post by: bmartino1 on September 21, 2016, 08:47:42 AM
memory serves, its a flag, other wises its account stuff... will double check and re look into this.
Title: Re: uploading file just from parent location
Post by: bmartino1 on September 21, 2016, 05:25:27 PM
yeah.. this is basic user account permission controls...

you need atleast two user accounts!

in my example i have "user" (the upload user) and the "admin" (full control user) account

*user will be the client / other peoples accounts!

Using all real folders...

first bind your hfs path to root

(*if you bind hfs to root in the folder, you can add the file to hfs, right click the file and add theses flags:
Hidden / recursively hidden [if that option is available to you] / no download / don't log / don't consider as download )

in my case for simplicity and easier user access, i have it at  c:\webroot
now for the properties of root:
access tab check anyone
upload tab check the two accounts

now a person can visit the site but will have to login in to upload files and folders

any and all folder that you don't want people to have upload access
go to that folder
upload only check the admin account

a logged in user will be able to travel, but not uploaded, they will get access denied errors....


Title: Re: uploading file just from parent location
Post by: gogi1000 on September 22, 2016, 08:45:16 AM
sorry my mistake. hidding upload button when user on subfolder location

VFS location folder (user see upload button)
VFS location subfolder (user not see upload button)

i tryed with next code

{.AND|{.get|can upload.}|{.%folder% = /.}|<div class="bigBtn"><a href="~upload" title="{.!lv_uploadTitle.}"><span>{.!lv_upload.}</span></a></div>.}

but upload button is hidden for every location
Title: Re: uploading file just from parent location
Post by: gogi1000 on September 22, 2016, 10:52:30 AM
i tryed with next code

{.if|{.and|{.get|can upload.}|{.%folder%=/test/.}.}|<div class="bigBtn"><a href="~upload" title="{.!lv_uploadTitle.}"><span>{.!lv_upload.}</span></a></div>.}

and this code is working but how instead /test/ putting some symbol or something else?
Title: Re: uploading file just from parent location
Post by: bmartino1 on September 22, 2016, 09:31:18 PM
i'm sligltly confused, what is you end goal?

a user login ins and they have access via the login permissions....

you need a different or special link that non intrusive? then fake a php string and add visit/downloads via rejetos help:
http://www.rejetto.com/forum/html-templates/create-special-download-links-(httpxxx-xxx-xxx-xxxfile)/msg1059265/#msg1059265

-----------
what you have described is that you don't want a user who has logged in to x area to be able to use same login to travel the other links and have upload to another x area....

i'm having a hard time understanding your issue to further help.
Title: Re: uploading file just from parent location
Post by: gogi1000 on September 23, 2016, 06:03:27 AM
i just want  hide upload button when user in subfolder. but when in parent folder upload button is showed
Title: Re: uploading file just from parent location
Post by: bmartino1 on September 23, 2016, 06:10:15 AM
i just want  hide upload button when user in subfolder. but when in parent folder upload button is showed

... that is done without editing the template... review my earlier post (even with pictures!)

YOU NEED TWO ACCOUNTS! a ADMIN ACCOUNT WITH FULL CONTROL!

the user Upload account!....

see pictures and permissions!
 
>:( ...

/\/\/\/\/\/\/\/\/\
then that is not your end goal.. for what ever reason... your wanting a different template code edit that is placed on the different template tab of the same template with your crazy idea of the upload code in the different template on all other folders that not the parent to not have upload...

Best way is to copy the dam template find and delete all "upload" past in different template of folders....
Your weird macro and code doesn't make sense to me... and the account permission are easier and faster!...


Either way you over thinking it.. and i'm no longer any help to you...
Title: Re: uploading file just from parent location
Post by: gogi1000 on September 23, 2016, 11:12:40 AM
my code
/test/ -parent location
/test/subfolder/ -sub location
{.if|{.and|{.get|can upload.}|{.%folder%=/test/.}.}|<div class="bigBtn"><a href="~upload" title="{.!lv_uploadTitle.}"><span>{.!lv_upload.}</span></a></div>.}

when in code i put {.%folder%=/test/.}.}
 all is ok, but because i have many users with different locations
i don't know how instead /test/ put some symbol or variable that i receive location according users
Title: Re: uploading file just from parent location
Post by: LeoNeeson on September 24, 2016, 12:44:16 AM
@bmartino1: :) hey pal, calm down, nobody forces you to help him. If you don't want or like help him, it's OK, just relax. We don't want to start a battle for something insignificant like this. This is a forum, not a private chat, so we all can participate and try to found a solution for his problem. If your solution doesn't fulfill his needs, then someone else will come here with a better solution. Just remember to be nice... ;)

i just want  hide upload button when user in subfolder. but when in parent folder upload button is showed
This is quite doable with macros, and I understand the user needs. He doesn't want to be editing 'permissions' properties on each folder he shares. Imagine he is sharing 1,000 folders, with 5,000 sub-folders, you can't apply the method given by bmartino1, since is an impossible task. His method can work for a few folders, but not for a massive amount of folders. But rest assured this should be easy to do with macros.

I recommend you (gogi1000) wait an answer for someone here expert with macros. ;)
Title: Re: uploading file just from parent location
Post by: bmartino1 on September 24, 2016, 01:56:04 AM
@bmartino1: :) hey pal, calm down, nobody forces you to help him. If you don't want or like help him, it's OK, just relax. We don't want to start a battle for something insignificant like this. This is a forum, not a private chat, so we all can participate and try to found a solution for his problem. If your solution doesn't fulfill his needs, then someone else will come here with a better solution. Just remember to be nice... ;)
This is quite doable with macros, and I understand the user needs. He doesn't want to be editing 'permissions' properties on each folder he shares. Imagine he is sharing 1,000 folders, with 5,000 sub-folders, you can't apply the method given by bmartino1, since is an impossible task. His method can work for a few folders, but not for a massive amount of folders. But rest assured this should be easy to do with macros.

I recommend you (gogi1000) wait an answer for someone here expert with macros. ;)
--------------------------------------------------------------------------------------------------------
 >:(

@leo... this is known stuff.. i know i'm not required to help etc...

my problem is when the user specially lies/ fails test... or plainly ignores..

something like hey that not what i want...

i specially asked:
Quote
i'm slightly confused, what is you end goal?

ANd we/ I got:
i just want  hide upload button when user in subfolder. but when in parent folder upload button is showed

and instead... i get something that was already answered...

------------------------------------------

SO while we on this little rant:
(witch this tell me, that the uses didn't even bother to read, nor looking for help... and to further the frustration, the third users comment is now gone...)


i was expecting the user "gogi1000" to put something like "using the template" to accomplish etc..etc...
or due to etc..etc.. this can't work, i need etc.etc...

since that didn't happen, he no longer worth my time....
-------------------------------------------------------------------------------

Yet i feel more moved now
 >:(
witch is why the  >:(

it for me to know not to bother with it any more...

especially since the answer (for the template again...) is to copy the dam template to the folder and remove the word "upload".... (sure there some more bugs to fix then that, but that would remove upload to all users...)

ore even define the upload path to a single port idk something like  {~upload = "http:\\ipaddr\fodler" }

That way all uploads regardless of when you hit the upload button will go to that folder....

he didn't mention implematiaon!.. or what it was beign used for.. so he has etc.. files...

Quote
Imagine he is sharing 1,000 folders, with 5,000 sub-folders, you can't apply the method

but hey... what the heck... since you want to call people out on the forum.. WHY NOT! : "We don't want to start a battle for something insignificant like this."


so i will no longer help in this regard....(but to explain and or comment to you...). and yes, the permission can be set easier, he would have to take the dam macro code to all the sub folders anyway... so you hypotical / image would still work under my solution...:

i don't know lets think this one out a bit more...

what a way we can add to subjugate files and folders with out problems!...

-----------------------
SOLUTION:
I know we use the virtual folder to "abc" file format...

so eatch folders and files are now going to have a new path... http:\\ipaddress\a\folder 1

then folder 2 and folder there  file there etc going down into a....

(this doesn't break real folders nor file paths....) simple right click root add virtual folder actual it "a"
drag all the sub content into virtual folder "a"
set what needs to be done to folder a...
(this includes the template...)

BUT THAT NOT WHAT WAS ASKED!

simple movement, and 1 single permission to add to a folder to apply the affect, you can do the same with the macros...

up untill this last post,
I have been nice....
(Maybe a bit arrogant...)

BUT hey since there was only one user that got on my nerves and he doesn't come around much...(and it not anyone on this thread...) i don't see the porblem nor point...
beside next time please PM me if you think it a problem LEO
Title: Re: uploading file just from parent location
Post by: LeoNeeson on September 24, 2016, 02:53:22 AM
BUT hey since there was only one user that got on my nerves and he doesn't come around much...(and it not anyone on this thread...) i don't see the porblem nor point...
beside next time please PM me if you think it a problem LEO
Hey, what's going on with you? Are you OK?... ??? There is no need for PM, since there is NO problem at all! I'm only reminding you this is a public forum, so we should have to respect each other, and not being angry 'for nothing'. Sometimes calling for 'silence' it's better than talk and talk. You always try to help, it's OK. But you act like you are alone here with the only truth, that's not so good. Since this is a forum, leave space and freedom to others to comment.

May be some moderator should come here to calm the waters, just saying... ::)

Anyway, I'm sorry to see you are lately too thin-skinned or hypersensitive to comments (maybe you're having a bad day). Don't worry, we all have those days.
Enjoy life, it's Friday! :)
Title: Re: uploading file just from parent location
Post by: gogi1000 on September 26, 2016, 06:37:00 AM
sorry if i made problem. i just search help for my problem
<quote>
my problem is when the user specially lies/ fails test... or plainly ignores..
</quote>
i don't lie. sorry my english is bad, maybe i don't understand your explain

i tryed with global variable but this solution also nothing

 {.set|lokacija|%folder%.}
   {.if|{.and|{.get|can upload.}|{.%folder%={.^#lokacija.}.}.}|<div class="bigBtn"><a href="~upload" title="{.!lv_uploadTitle.}"><span>{.!lv_upload.}</span></a></div>.}