$canCheckin = JFactory::getUser()->authorise('core.admin', 'com_content'); JToolbarHelper::checkin('item_id', $canCheckin);This code will create a 'checkin' button for an item with ID 'item_id'. If the user has the 'core.admin' permission for the 'com_content' component, the button will be enabled, otherwise it will be disabled. Package/library: This code example uses the 'core' Joomla package/library, which is included in the Joomla installation.