Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11946

hook permissions as described not implemented

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      Per

      http://wiki.civicrm.org/confluence/display/CRMDOC42/hook_civicrm_permissions

      This turned out to be super simple - one possible question - should we call it permissions_alter rather than permissions - that would be most intuitive to drupal types & perhaps others?

      Index: CRM/Core/Permission.php
      ===================================================================
      — CRM/Core/Permission.php (revision 45716)
      +++ CRM/Core/Permission.php (working copy)
      @@ -414,7 +414,7 @@
      }
      }
      }
      -
      + CRM_Utils_Hook::permissions($permissions);
      return $permissions;
      }

      Index: CRM/Utils/Hook.php
      ===================================================================
      — CRM/Utils/Hook.php (revision 45716)
      +++ CRM/Utils/Hook.php (working copy)
      @@ -1175,4 +1175,20 @@
      'civicrm_cron'
      );
      }
      +
      + /**
      + * This hook is called to alter the civicrm permissions available
      + * to be provided to the CMS
      + *
      + * @param array $permissions
      + *
      + * @return null the return value is ignored
      + * @access public
      + */
      + static function permissions(&$permissions)

      { + return self::singleton()->invoke(1, + $permissions, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, + 'civicrm_permissions' + ); + }

      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eileen Eileen McNaughton
                Reporter:
                eileen Eileen McNaughton
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: