tinyfilemanager icon indicating copy to clipboard operation
tinyfilemanager copied to clipboard

$global_readonly not working

Open kc9ryt opened this issue 2 years ago • 4 comments

Hello, I am running v. 2.4.7 and $global_readonly = true does not seem to be working with auth turned off.

kc9ryt avatar Mar 19 '22 17:03 kc9ryt

@kc9ryt , check this #583

prasathmani avatar Mar 20 '22 07:03 prasathmani

Full disclosure, I'm an idiot. I followed the link to issue 583 and I don't understand what it's getting at. Why doesn't setting global_readonly to true make it....read only? I am not a PHP expert, but I want to share a collection of files with a local club and I want them to be able to access the file directories, but NOT have any kind of editing privileges. I would prefer not needing a guest login or any login screen. Simply go to the directory and it will show a list of all files for browsing. I just want them to view the documents and download. All the file management stuff I can handle via FTP.

shadowvfx avatar Mar 22 '22 16:03 shadowvfx

This in not working for me either @prasathmani . Or are we doing something wrong?

alex-reach avatar Jun 24 '22 13:06 alex-reach

Yes, this feature is seriously missing.

I want only the Administrator to be able to manage files (requires login).

But for public users, don't need to log in. They can go directly to the file list but can't edit/delete/upload files.

I tried pointing to the link tinymanager.php?fm_usr=user&fm_pwd=user123 but this doesn't work.

How can public users bypass the login form?

mrlawrencelam avatar Jul 20 '22 20:07 mrlawrencelam

$global_readonly isn't currently referenced anywhere in the PHP file apart from the initial definition.

To get this to work I think you just need to change the definition of FM_READONLY in line 396 to the following -

define('FM_READONLY', ($use_auth && !empty($readonly_users) && isset($_SESSION[FM_SESSION_ID]['logged']) && in_array($_SESSION[FM_SESSION_ID]['logged'], $readonly_users)) || $global_readonly);

andymcca avatar Sep 29 '22 10:09 andymcca

This issue is addressed in the new release.

prasathmani avatar Nov 19 '22 20:11 prasathmani