--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/BCzY8dl_XQ8J.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/BI79imNnJM4J.
Ove and Betweenbrain, thanks for your thoughts. Always good to get another perspective.
Let me elaborate a little...
I'm developing a property management component (backend only) where a user can manage aspects of their property. That is, the description, images, availability, prices and special offers etc. I am porting a legacy system into Joomla.
I have it setup so that the user group 'property owner' can access the component and only sees a list (JModelList) of properties that they own. A second 'admin' user group can also access the same component but this time they would see a list of all properties on the system. Initially, I thought about doing this with the ACL and the core.editown ACL rule but that wasn't correct so I simply only select those properties the user owns if they are not in an admin group as follows:
// Check the user group this user belongs to.
// 8 is super user admin group.
if (!in_array(8, $groups))
{
$query->where('created_by='.$userId);
}
This works fine and limits one user group to only edit the properties that they own. The ACL complements this well enough as I can control which group can delete or publish items through the core ACL options.
With the special offers I have set up a list view of all the special offers a user 'owns' but currently this is a view within my property management component. After consideration I think what I will do (as you both suggested) is to make a separate 'special offers' component and simply link to it via the property manager component (or perhaps have a modal for it). That way I can make use of the ACL permissions for publish, delete etc and possibly add custom item specific ACL rules, but am awaiting the wiki updates to truly understand how to do that... ;-)
Anyway, hope that makes sense and wasn't too boring... :-)
Thanks again,
Adam