Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • areyouahuman
      • auth
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
        • default
      • exchange
        • rates
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • quickbooks
            • invoice
      • json
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • recaptcha
      • reports
        • aging
          • invoices
        • custom
          • report
        • invoice
          • creation
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • form
      • html
      • javascript
      • xml
    • lib
  • None
  • PHP

Classes

  • Acl
  • AdminTest
  • Session

Class Acl

A generic Access Control List Component with inherited permissions based on a hierarchical tree structure. The terminology for this system is as follows:

ACL = Access Control List ACO = Access Control Object (i.e. a thing, such as a URI) ARO = Access Resource Object (i.e. an entity, such as a user)

The ACL is made up of AROs and their associated ACOs for specific actions. Actions are either explicitly allowed or denied. Requires the Record component.

Package: minPHP
Subpage: minPHP.components.acl
Located at components/acl/acl.php

Methods summary

public
# __construct( )

Initialize the ACL

Initialize the ACL

public boolean
# check( string $aro_alias, string $aco_alias, string $action = "*" )

Check whether the ARO is allowed access to the ACO

Check whether the ARO is allowed access to the ACO

Parameters

$aro_alias
string
$aco_alias The alias of the ACO
$aco_alias
string
$aro_alias The alias of the ARO
$action
string
$action The action to verify on the ACO

Returns

boolean
True if the ARO is allowed to access the ACO, else false
public array
# getAccessList( string $aro_alias, string $aco_alias )

Fetches the Access List for the ARO on the given ACO

Fetches the Access List for the ARO on the given ACO

Parameters

$aro_alias
string
$aco_alias The alias of the ACO
$aco_alias
string
$aro_alias The alias of the ARO

Returns

array
An array of ARO/ACO hierachy relationships
public
# allow( string $aro_alias, string $aco_alias, string $action = "*" )

Record that the ARO has access to the ACO for the given action

Record that the ARO has access to the ACO for the given action

Parameters

$aro_alias
string
$aco_alias The alias of the ACO
$aco_alias
string
$aro_alias The alias of the ARO
$action
string
$action The action to allow
public
# deny( string $aro_alias, string $aco_alias, string $action = "*" )

Record that the ARO does not have access to the ACO for the given action

Record that the ARO does not have access to the ACO for the given action

Parameters

$aro_alias
string
$aco_alias The alias of the ACO
$aco_alias
string
$aro_alias The alias of the ARO
$action
string
$action The action to deny
public integer
# addAro( string $alias, mixed $parent = null )

Add a new ARO as a child to the given parent

Add a new ARO as a child to the given parent

Parameters

$alias
string
$alias The alias of the ARO
$parent
mixed
$parent The parent of this ARO, either the int ID, or a string alias of the parent ARO

Returns

integer
The ID of the ARO added
public
# removeAro( string $alias )

Removes the ARO from the ARO and ACL

Removes the ARO from the ARO and ACL

Parameters

$alias
string
$alias The Alias of the ARO
public integer
# addAco( string $alias )

Add a new ACO

Add a new ACO

Parameters

$alias
string
$alias The alias of the ACO

Returns

integer
The ID of the ACO added
public
# removeAco( string $alias )

Removes the ACO from the ACO and ACL

Removes the ACO from the ACO and ACL

Parameters

$alias
string
$alias The Alias of the ACO
public
# removeAcl( string $aro_alias = null, string $aco_alias = null, string $action = null )

Removes an entry from the ACL that matches the given ARO, ACO, and action

Removes an entry from the ACL that matches the given ARO, ACO, and action

Parameters

$aro_alias
string
$aro_alias The ARO alias
$aco_alias
string
$aco_alias The ACO alias
$action
string
$action The action
public mixed
# getAroByAlias( string $alias )

Retrieve the ARO with the given alias

Retrieve the ARO with the given alias

Parameters

$alias
string
$alias The alias of the ARO

Returns

mixed
An array containing the ARO, false if no match found
public mixed
# getAcoByAlias( string $alias )

Retrieve the ACO with the given alias

Retrieve the ACO with the given alias

Parameters

$alias
string
$alias The alias of the ACO

Returns

mixed
An array containing the ACO, false if no match found

Magic methods summary

Blesta API documentation generated by ApiGen 2.8.0