- $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'view');
- $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
- $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
- $this->assign('contactId', $this->_contactId);
-
- // check logged in url permission
- CRM_Contact_Page_View::checkUserPermission($this);
-
- $this->assign('action', $this->_action);
-
- if ($this->_permission == CRM_Core_Permission::EDIT && !CRM_Core_Permission::check('edit contributions')) {
- // demote to view since user does not have edit contrib rights
- $this->_permission = CRM_Core_Permission::VIEW;
- $this->assign('permission', 'view');
- }