Added option to pass user object to getActions helper method.

This commit is contained in:
Llewellyn van der Merwe 2019-09-02 10:27:11 +02:00
parent 0b95737524
commit 9781910dd3
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
9 changed files with 46 additions and 26 deletions

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.0) with **ALL** its features and **ALL** concepts totally open-source and free! You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.1) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -146,11 +146,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 28th August, 2019 + *Last Build*: 2nd September, 2019
+ *Version*: 2.10.0 + *Version*: 2.10.1
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **250837** + *Line count*: **250924**
+ *Field count*: **1343** + *Field count*: **1343**
+ *File count*: **1608** + *File count*: **1608**
+ *Folder count*: **253** + *Folder count*: **253**

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.0) with **ALL** its features and **ALL** concepts totally open-source and free! You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.1) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -146,11 +146,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 28th August, 2019 + *Last Build*: 2nd September, 2019
+ *Version*: 2.10.0 + *Version*: 2.10.1
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **250837** + *Line count*: **250924**
+ *Field count*: **1343** + *Field count*: **1343**
+ *File count*: **1608** + *File count*: **1608**
+ *Folder count*: **253** + *Folder count*: **253**

View File

@ -308,14 +308,19 @@ abstract class ###Component###Helper
* @param string $views The related list view name * @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete) * @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component * @param string $component The target component
* @param object $user The user whose permissions we are loading
* *
* @return object The JObject of permission/authorised actions * @return object The JObject of permission/authorised actions
* *
**/ **/
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###') public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###', $user = 'null')
{
// load the user if not given
if (!self::checkObject($user))
{ {
// get the user object // get the user object
$user = JFactory::getUser(); $user = JFactory::getUser();
}
// load the JObject // load the JObject
$result = new JObject; $result = new JObject;
// make view name safe (just incase) // make view name safe (just incase)

View File

@ -654,14 +654,19 @@ abstract class ###Component###Helper
* @param string $views The related list view name * @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete) * @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component * @param string $component The target component
* @param object $user The user whose permissions we are loading
* *
* @return object The JObject of permission/authorised actions * @return object The JObject of permission/authorised actions
* *
**/ **/
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###') public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###', $user = 'null')
{
// load the user if not given
if (!self::checkObject($user))
{ {
// get the user object // get the user object
$user = JFactory::getUser(); $user = JFactory::getUser();
}
// load the JObject // load the JObject
$result = new JObject; $result = new JObject;
// make view name safe (just incase) // make view name safe (just incase)

View File

@ -5942,14 +5942,19 @@ abstract class ComponentbuilderHelper
* @param string $views The related list view name * @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete) * @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component * @param string $component The target component
* @param object $user The user whose permissions we are loading
* *
* @return object The JObject of permission/authorised actions * @return object The JObject of permission/authorised actions
* *
**/ **/
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder') public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder', $user = 'null')
{
// load the user if not given
if (!self::checkObject($user))
{ {
// get the user object // get the user object
$user = JFactory::getUser(); $user = JFactory::getUser();
}
// load the JObject // load the JObject
$result = new JObject; $result = new JObject;
// make view name safe (just incase) // make view name safe (just incase)

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>28th August, 2019</creationDate> <creationDate>2nd September, 2019</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.</copyright> <copyright>Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>2.10.0</version> <version>2.10.1</version>
<description><![CDATA[ <description><![CDATA[
<h1>Component Builder (v.2.10.0)</h1> <h1>Component Builder (v.2.10.1)</h1>
<div style="clear: both;"></div> <div style="clear: both;"></div>
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. <p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.

View File

@ -803,10 +803,10 @@
<description>Builds Complex Joomla Components</description> <description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element> <element>com_componentbuilder</element>
<type>component</type> <type>component</type>
<version>2.10.0</version> <version>2.10.1</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl> <infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.10.0/JCB_v2.10.0.zip</downloadurl> <downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.10.1/JCB_v2.10.1.zip</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>stable</tag> <tag>stable</tag>

View File

@ -7637,7 +7637,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder"> echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/> <img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 2.10.0 Was Successful! Let us know if anything is not working as expected.</h3>'; <h3>Upgrade to Version 2.10.1 Was Successful! Let us know if anything is not working as expected.</h3>';
// Create the componentbuilder action logs extensions object. // Create the componentbuilder action logs extensions object.
$componentbuilder_action_logs_extensions = new stdClass(); $componentbuilder_action_logs_extensions = new stdClass();

View File

@ -6022,14 +6022,19 @@ abstract class ComponentbuilderHelper
* @param string $views The related list view name * @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete) * @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component * @param string $component The target component
* @param object $user The user whose permissions we are loading
* *
* @return object The JObject of permission/authorised actions * @return object The JObject of permission/authorised actions
* *
**/ **/
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder') public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder', $user = 'null')
{
// load the user if not given
if (!self::checkObject($user))
{ {
// get the user object // get the user object
$user = JFactory::getUser(); $user = JFactory::getUser();
}
// load the JObject // load the JObject
$result = new JObject; $result = new JObject;
// make view name safe (just incase) // make view name safe (just incase)