Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
plugins
CiviCRM Permissions Sync
Commits
a8a4636e
Commit
a8a4636e
authored
Apr 10, 2019
by
Christian Wach
⚽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sanity check role before adding caps
parent
5d797086
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
reset-wp-civicrm-roles-caps.php
reset-wp-civicrm-roles-caps.php
+5
-0
No files found.
reset-wp-civicrm-roles-caps.php
View file @
a8a4636e
...
...
@@ -257,6 +257,11 @@ class CiviCRM_Permissions_Sync {
// Get the role to apply all CiviCRM permissions to.
$custom_role
=
$this
->
role_get
();
// Bail if something went wrong.
if
(
empty
(
$custom_role
)
)
{
return
;
}
// Add the capabilities if not already added.
foreach
(
$capabilities
as
$capability
)
{
if
(
!
$custom_role
->
has_cap
(
$capability
)
)
{
...
...
Write
Preview
Markdown
is supported
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