Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Embedded in another script) Pass in a ReadOnly Flag or an Admin Flag #1267

Open
cr750 opened this issue Dec 31, 2024 · 0 comments
Open

(Embedded in another script) Pass in a ReadOnly Flag or an Admin Flag #1267

cr750 opened this issue Dec 31, 2024 · 0 comments

Comments

@cr750
Copy link

cr750 commented Dec 31, 2024

I have a very basic PHP application in which I've embedded TinyFileManger. My application uses a $_SESSION variable which contains one of 5 user authority levels within the application. I want to pass the authority level into TinyFileManager as a UserName so that low authority level User (1, 2, or 3) has ReadOnly access and those with a high authority level (4 and 5).

I have set up 5 users in the tinyfilemanager.php and set 1, 2, and 3 as ReadOnly Users and altered these lines -

// always use ?p=
if (!isset($_GET['p']) && empty($_FILES)) {
//    fm_redirect(FM_SELF_URL . '?p=');
    fm_redirect(FM_SELF_URL . '?p=&username='. $_SESSION['auth_lvl']);
}

But that does not seem to have the desired effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant