Raymond, This is Richard - I am working with Katie on this project.
To be clear - we are unable to provide full super user access to our client who will operate the website. To do so would expose configuration and code elements to the client which we cannot permit.
So, we wish to create an admin account for the back end which will lock down certain parts of the administration interface. This is not a super user.
How do we allow this specific client admin account to pin their stream items in the newsfeed?
I have looked at the behaviour in the function canSticky() and can make a modification to specify a specific Joomla user ID, but this does not allow this client admin user to pin their item in the newsfeed.
/**
* Determines if the stream item can be made sticky
*
* @since 1.3
* @access public
*/
public function canSticky()
{
if (!$this->config->get('stream.pin.enabled')) {
return false;
}
// If the stream is moderated, it shouldn't be allowed to be stickied
if ($this->isModerated()) {
return false;
}
if ($this->isCluster()) {
$cluster = ES::cluster($this->cluster_type, $this->cluster_id);
// if user is not the cluster owner or the admin, then dont alllow to sticky
if (!$cluster->isOwner() && !$cluster->isAdmin()) {
return false;
}
// bonzomedia enable only if the user is set to be a specific user id rather than implicit easysocial isAdmin
//$bonzo_user = JFactory::getUser();
//if (!$cluster->isOwner() && $bonzo_user->id != 287) {
// return false;
//}
} else {
if (!$this->isOwner()) {
return false;
}
}
return true;
}
Somewhere else in your code you are making some kind of check for super user to allow this item pin in the newsfeed.
Can you tell me where this is, or suggest another way to allow the specification of a specific administrator user to be able to pin their item in the newsfeed please?
From my perspective, as it currently stands this is a severe limitation of easysocial - locking this functionality to a super user is not workable in environments where access to only parts of the administration interface is required.
Look forward to hearing from you,
Richard