first post so please forgive any netiquette transgressions. I'm following the guide https://civicrm.org/bug-reporting to get confirmation this is a bug.
Version: 4.6.12 (also present in 4.7.1)
CMS: Wordpress
* Bug description *
User 1 (admin) creates a case and assigns a role to user 2. User 1 creates an activity on this case and assigns the activity to user 2.
User2 has the ACL role "edit my activities and cases" and logs in. They can see their case and Manage it. When user2 clicks the Edit link alongside the activity user1 assigned to them they get an error, "Sorry an Error Occured You are not authorised to access this page.".
This also generates the following in the Apache error log:
PHP Warning: array_key_exists(): The first argument should be either a string or an integer in /wp-content/plugins/civicrm/civicrm/CRM/Case/Form/Activity.php on line 121, referer: https://ourtestdomain.co.uk/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview%2Fcase&reset=1&id=3&cid=16&action=view&context=dashboard&selectedChild=case
Line 121 should be passing a case ID into the array_key_exists() call and that case ID should be an int or a string. The comment at the top of Activity.php suggests that the original author expected it to be an int. However the variable passed holds an object that contains the case id in question. This generates the warning in the error log and the pop-up seen by the user. If the case id is extracted from the object and passed into array_key_exists the user can edit the activity.
User2 has permission to edit this activity and I believe its a bug that they cannot.
NB because of the need for multiple users I haven't been able to recreate this on the demo install where you only have one user.
If you could confirm this I will file a bug report per step 7 of the guide.
Many thanks.
axa