Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
UK Postcodes
Commits
839177dd
Unverified
Commit
839177dd
authored
Nov 28, 2018
by
mattwire
Committed by
GitHub
Nov 28, 2018
Browse files
Merge pull request #24 from mattwire/lookup_permissions
Create new permission to access postcode lookups
parents
41ce81fe
eb126875
Changes
2
Hide whitespace changes
Inline
Side-by-side
civicrmpostcodelookup.php
View file @
839177dd
...
...
@@ -184,3 +184,16 @@ function civicrmpostcodelookup_civicrm_buildForm($formName, &$form) {
->
addStyleFile
(
'uk.co.vedaconsulting.module.civicrmpostcodelookup'
,
'css/civipostcode.css'
,
110
,
'page-header'
);
}
}
/**
* Implementation of hook_civicrm_permission
*
* @param array $permissions
* @return void
*/
function
civicrmpostcodelookup_civicrm_permission
(
&
$permissions
)
{
$prefix
=
ts
(
'CiviCRM'
)
.
': '
;
// name of extension or module
$permissions
+=
array
(
'access postcode lookup'
=>
$prefix
.
ts
(
'Access CiviCRM Postcode lookups'
),
);
}
xml/Menu/civicrmpostcodelookup.xml
View file @
839177dd
...
...
@@ -9,41 +9,41 @@
<item>
<path>
civicrm/afd/ajax/search
</path>
<page_callback>
CRM_Civicrmpostcodelookup_Page_Afd::search
</page_callback>
<access_arguments>
view event info
</access_arguments>
<access_arguments>
access postcode lookup
</access_arguments>
</item>
<item>
<path>
civicrm/afd/ajax/get
</path>
<page_callback>
CRM_Civicrmpostcodelookup_Page_Afd::getaddress
</page_callback>
<access_arguments>
view event info
</access_arguments>
<access_arguments>
access postcode lookup
</access_arguments>
</item>
<item>
<path>
civicrm/civipostcode/ajax/search
</path>
<page_callback>
CRM_Civicrmpostcodelookup_Page_Civipostcode::search
</page_callback>
<access_arguments>
view event info
</access_arguments>
<access_arguments>
access postcode lookup
</access_arguments>
</item>
<item>
<path>
civicrm/civipostcode/ajax/get
</path>
<page_callback>
CRM_Civicrmpostcodelookup_Page_Civipostcode::getaddress
</page_callback>
<access_arguments>
view event info
</access_arguments>
<access_arguments>
access postcode lookup
</access_arguments>
</item>
<item>
<path>
civicrm/experian/ajax/search
</path>
<page_callback>
CRM_Civicrmpostcodelookup_Page_Experian::search
</page_callback>
<access_arguments>
view event info
</access_arguments>
<access_arguments>
access postcode lookup
</access_arguments>
</item>
<item>
<path>
civicrm/experian/ajax/get
</path>
<page_callback>
CRM_Civicrmpostcodelookup_Page_Experian::getaddress
</page_callback>
<access_arguments>
view event info
</access_arguments>
<access_arguments>
access postcode lookup
</access_arguments>
</item>
<item>
<path>
civicrm/postcodeanywhere/ajax/search
</path>
<page_callback>
CRM_Civicrmpostcodelookup_Page_PostcodeAnywhere::search
</page_callback>
<access_arguments>
view event info
</access_arguments>
<access_arguments>
access postcode lookup
</access_arguments>
</item>
<item>
<path>
civicrm/postcodeanywhere/ajax/get
</path>
<page_callback>
CRM_Civicrmpostcodelookup_Page_PostcodeAnywhere::getaddress
</page_callback>
<access_arguments>
view event info
</access_arguments>
<access_arguments>
access postcode lookup
</access_arguments>
</item>
</menu>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment