// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
return array(
'administer CiviCampaign',
'manage campaign',
}
// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
return array(
'delete in CiviCase',
'administer CiviCase',
}
// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
return array(
'access CiviContribute',
'edit contributions',
* Needs to be implemented in component's information
* class.
*
+ * NOTE: if using conditionally permission return,
+ * implementation of $getAllUnconditionally is required.
* @return array|null collection of permissions, null if none
* @access public
*
*/
- abstract public function getPermissions();
+ abstract public function getPermissions($getAllUnconditionally = FALSE);
/**
* Provides information about user dashboard element
if (empty($allCompPermissions)) {
$components = CRM_Core_Component::getComponents();
foreach ($components as $name => $comp) {
- $allCompPermissions[$name] = $comp->getPermissions();
+ //get all permissions of each components unconditionally
+ $allCompPermissions[$name] = $comp->getPermissions(TRUE);
}
}
}
// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
return array(
'access CiviEvent',
'edit event participants',
// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
return array(
'access CiviGrant',
'edit grants',
}
// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
$permissions = array(
'access CiviMail',
'access CiviMail subscribe/unsubscribe pages',
'view public CiviMail content',
);
- if (self::workflowEnabled()) {
+ if (self::workflowEnabled() || $getAllUnconditionally) {
$permissions[] = 'create mailings';
$permissions[] = 'schedule mailings';
$permissions[] = 'approve mailings';
// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
return array(
'access CiviMember',
'edit memberships',
// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
return array(
'access CiviPledge',
'edit pledges',
// docs inherited from interface
- public function getPermissions() {
+ public function getPermissions($getAllUnconditionally = FALSE) {
return array('access CiviReport', 'access Report Criteria', 'administer reserved reports', 'administer Reports');
}