The EuroCMS Permissions

The ECMS permissions are things that you can block access to per user, domain, ...

Core.Permissions

The main permissions file, is the core.permissions.php

functions list:

  • register - register a permission (It will save it in the DataBase)

  • GET - get the registered function

The logged-in user will be checked if it can access the requested permission.

  • check - Check if the user has rights to the registered function

  • list - list Registered functions

  • remove - remove the registered function

example:

GET a registered function.

$permissions = new permissions();
$files_add = $permissions->GET('files_add');

$files_add will have the requested permission content

e.g.: <button name="files_add" type="submit" value="Upload Files" onclick="upload()">

{Files,Users,Forms}.Permissions

If the checks in core.Permissions.php have passed, it will request the content from the Files permission controller.

files_add

DataBase

This will be used to request the wanted permission (e.g.: files_add,users_add,themes_add, ..., ...)

  • core.Permissions ->

Requesting the Permission Controller - {Files,Users,Themes}.permissions

This will see if the requested permission controller exist (e.g.: Files, Users, Themes, ..., ...)

  - DataBase