Comments (4)
C'est très simple, il suffit de tester si ton utilisateur a les permissions suffisantes et de renvoyer true
ou false
selon le cas :
function auth()
{
if($_SESSION['authenticated']) return true;
// ou if($_SESSION['authenticated'] && $_SESSION['isAdministrator']) return true;
else return false;
}
n'oublies pas d'initialiser ta session en amont avec session_start()
.
from richfilemanager.
Merci pour la réponse (en français !!)
Par contre je suis un peu perdu sur (je suis n00b !!) :
- ce qui tu me proposes doit se mettre à la place de auth() dans le fichier filemanager.php, en laissant le reste ?
- du coup où sont stockés les user/passwords ?
- et -- désolé pour la question... -- où place-t-on le session_start() ?
D'avance merci ^_^
from richfilemanager.
tu peux placer le session_start() au début du fichier filemanager.php
Dans ce même fichier tu remplaces la fonction auth par celle que je vien de te mettre en exemple. Mais dans cet exemple, cela implique que tu as déjà une base de donnée utilisateur / et un système d'authentification déjà existant. Par défaut le Filemanager ne gère pas les utilisateurs et leurs droits - ce n'est pas son rôle !
from richfilemanager.
Ah ok, c'est donc cela qui me manque...
Mes maigres connaissances ne vont pas me permettre de m'en sortir je crois... Au pire je vais passer par un htaccess ça sera déjà cela !
Merci en tout cas !!!
from richfilemanager.
Related Issues (20)
- how to prevent right click event
- No thumbs HOT 3
- Excel Sheet file view and edit
- No thumbs in laravel project
- Flash file not able to upload HOT 1
- Cannot hook on Rename
- Can we expand all the folder from s3 using single request??? HOT 1
- Copy a folder create 0 byte file in S3
- Failed to resize image (original, thumbnail) on the server
- E_INVALID_PAR_TYPE error while loading HOT 2
- How can I hook into the download action? Is there a callback available?
- RichFilemanger Fails to run under IIS HOT 1
- Use RichFilemanger in .Net Core 3.1 project HOT 1
- Deleted
- Uncaught (in promise) ReferenceError: purl is not defined
- Load other client side configuration manually? (filemanager-config.json) HOT 2
- Preview URL some path items duplicated. HOT 1
- Next/Prev buttons in preview window
- Image broken when preview the uploaded image
- imagesx(): Argument #1 ($image) must be of type GdImage, bool given
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from richfilemanager.