CRM-12499 - CRM_Core_Permission_Base::translatePermission
authorTim Otten <totten@civicrm.org>
Sat, 25 May 2013 04:01:36 +0000 (00:01 -0400)
committerTim Otten <totten@civicrm.org>
Sat, 25 May 2013 04:32:11 +0000 (00:32 -0400)
commit085823c16c31482c3d7d26d1dbb8ab2728566544
treefaecdf8a5d6e7ac446e8be2dd0905bb140cb3d2c
parentfc7a0aee8f5517d4c84e4339b098ce9fd2201d46
CRM-12499 - CRM_Core_Permission_Base::translatePermission

Add helper function translatePermission which translates an expression like
"administer CiviCRM", "cms:view user account", or "drupal:access user
profiles" into something understood by native CMS.

Use translatePermission as part of check() in D6, D7, WP.

Use placeholder permssions ALWAYS_ALLOW_PERMISSION and
ALWAYS_DENY_PERMISSION for select corner cases.

----------------------------------------
* CRM-12499: Allow users with 'access user profiles' to access $userRecordUrl
  http://issues.civicrm.org/jira/browse/CRM-12499
CRM/Core/Permission.php
CRM/Core/Permission/Base.php
CRM/Core/Permission/Drupal.php
CRM/Core/Permission/Drupal6.php
CRM/Core/Permission/DrupalBase.php
CRM/Core/Permission/WordPress.php
tests/phpunit/CRM/Core/Permission/BaseTest.php [new file with mode: 0644]
tests/phpunit/CRM/Core/Permission/GenericTest.php [new file with mode: 0644]