Giter Site home page Giter Site logo

User persmission about richfilemanager HOT 4 CLOSED

cpxo avatar cpxo commented on May 13, 2024
User persmission

from richfilemanager.

Comments (4)

simogeo avatar simogeo commented on May 13, 2024

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.

cpxo avatar cpxo commented on May 13, 2024

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.

simogeo avatar simogeo commented on May 13, 2024

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.

cpxo avatar cpxo commented on May 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.