mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-06 08:03:39 +02:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
|
@ -1,23 +1,26 @@
|
|||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Controller.Component.Acl
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('AclInterface', 'Controller/Component/Acl');
|
||||
App::uses('Hash', 'Utility');
|
||||
App::uses('ClassRegistry', 'Utility');
|
||||
|
||||
/**
|
||||
* DbAcl implements an ACL control system in the database. ARO's and ACO's are
|
||||
* structured into trees and a linking table is used to define permissions. You
|
||||
* DbAcl implements an ACL control system in the database. ARO's and ACO's are
|
||||
* structured into trees and a linking table is used to define permissions. You
|
||||
* can install the schema for DbAcl with the Schema Shell.
|
||||
*
|
||||
* `$aco` and `$aro` parameters can be slash delimited paths to tree nodes.
|
||||
|
@ -26,19 +29,18 @@ App::uses('Hash', 'Utility');
|
|||
*
|
||||
* Would point to a tree structure like
|
||||
*
|
||||
* {{{
|
||||
* ```
|
||||
* controllers
|
||||
* Users
|
||||
* edit
|
||||
* }}}
|
||||
* ```
|
||||
*
|
||||
* @package Cake.Controller.Component.Acl
|
||||
*/
|
||||
class DbAcl extends Object implements AclInterface {
|
||||
class DbAcl extends CakeObject implements AclInterface {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
|
@ -50,7 +52,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
/**
|
||||
* Initializes the containing component and sets the Aro/Aco objects to it.
|
||||
*
|
||||
* @param AclComponent $component
|
||||
* @param AclComponent $component The AclComponent instance.
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(Component $component) {
|
||||
|
@ -64,7 +66,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success (true if ARO has access to action in ACO, false otherwise)
|
||||
* @return bool Success (true if ARO has access to action in ACO, false otherwise)
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html#checking-permissions-the-acl-component
|
||||
*/
|
||||
public function check($aro, $aco, $action = "*") {
|
||||
|
@ -77,8 +79,8 @@ class DbAcl extends Object implements AclInterface {
|
|||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $actions Action (defaults to *)
|
||||
* @param integer $value Value to indicate access type (1 to give access, -1 to deny, 0 to inherit)
|
||||
* @return boolean Success
|
||||
* @param int $value Value to indicate access type (1 to give access, -1 to deny, 0 to inherit)
|
||||
* @return bool Success
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html#assigning-permissions
|
||||
*/
|
||||
public function allow($aro, $aco, $actions = "*", $value = 1) {
|
||||
|
@ -91,7 +93,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success
|
||||
* @return bool Success
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html#assigning-permissions
|
||||
*/
|
||||
public function deny($aro, $aco, $action = "*") {
|
||||
|
@ -104,7 +106,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success
|
||||
* @return bool Success
|
||||
*/
|
||||
public function inherit($aro, $aco, $action = "*") {
|
||||
return $this->allow($aro, $aco, $action, 0);
|
||||
|
@ -116,7 +118,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success
|
||||
* @return bool Success
|
||||
* @see allow()
|
||||
*/
|
||||
public function grant($aro, $aco, $action = "*") {
|
||||
|
@ -129,7 +131,7 @@ class DbAcl extends Object implements AclInterface {
|
|||
* @param string $aro ARO The requesting object identifier.
|
||||
* @param string $aco ACO The controlled object identifier.
|
||||
* @param string $action Action (defaults to *)
|
||||
* @return boolean Success
|
||||
* @return bool Success
|
||||
* @see deny()
|
||||
*/
|
||||
public function revoke($aro, $aco, $action = "*") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue