Skip to content

Commit

Permalink
Merge pull request techjoomla#15 from thite-amol/release-1.1.0
Browse files Browse the repository at this point in the history
 Task techjoomla#14 chore: Update the doc comment
  • Loading branch information
thite-amol committed Aug 7, 2019
2 parents 23e1539 + 36421f1 commit 9fd8f56
Show file tree
Hide file tree
Showing 44 changed files with 220 additions and 174 deletions.
9 changes: 5 additions & 4 deletions src/administrator/controller.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/controllers/action.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

// No direct access
Expand Down
10 changes: 6 additions & 4 deletions src/administrator/controllers/actions.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die();

use Joomla\CMS\MVC\Controller\AdminController;
Expand Down
6 changes: 4 additions & 2 deletions src/administrator/controllers/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
/**
* @package Subusers
* @subpackage com_subusers
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/controllers/mapping.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/controllers/mappings.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/controllers/role.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

// No direct access
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/controllers/roles.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/controllers/user.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/controllers/users.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down
10 changes: 6 additions & 4 deletions src/administrator/helpers/subusers.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die();

/**
Expand Down
13 changes: 8 additions & 5 deletions src/administrator/includes/rbacl.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die();
Expand Down Expand Up @@ -154,10 +155,12 @@ public static function check($userId, $client, $action, $contentId = null)
*/
public static function authorise($userId, $client, $action, $contentId = null)
{
$client = (string) $client;
$action = (string) $action;
$user = Factory::getUser($userId);
$result = $user->authorise($action, $client);

return $result && self::check($userId, $client, $action);
return $result && self::check($userId, $client, $action, $contentId);
}

/**
Expand Down
11 changes: 6 additions & 5 deletions src/administrator/libraries/action.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die('Unauthorized Access');
Expand Down Expand Up @@ -188,7 +189,7 @@ public function bind(&$array)
*
* @since __DEPLOY_VERSION__
*/
public static function loadActionByCode(String $code, String $client)
public static function loadActionByCode($code, $client)
{
$table = RBACL::table("action");
$table->load(array("code" => $code, "client" => $client));
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/libraries/role.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die('Unauthorized Access');
Expand Down
11 changes: 6 additions & 5 deletions src/administrator/models/action.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down Expand Up @@ -58,7 +59,7 @@ public function getForm($data = array(), $loadData = true)
$form = $this->loadForm(
'com_subusers.action', 'action',
array('control' => 'jform',
'load_data' => $loadData
'load_data' => $loadData,
)
);

Expand Down
11 changes: 6 additions & 5 deletions src/administrator/models/actions.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die();
Expand Down Expand Up @@ -36,7 +37,7 @@ public function __construct($config = array())
'id', 'a.id',
'name', 'a.name',
'client', 'a.client',
'code', 'a.code'
'code', 'a.code',
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/administrator/models/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
* @package Subusers
* @subpackage com_subusers
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down Expand Up @@ -37,6 +38,7 @@ public function getItems()

return false;
}

return $changeSet;
}
}
9 changes: 5 additions & 4 deletions src/administrator/models/fields/action.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die();
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/models/fields/role.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die();
Expand Down
9 changes: 5 additions & 4 deletions src/administrator/models/mapping.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down
11 changes: 6 additions & 5 deletions src/administrator/models/mappings.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* @package Subusers
* @package Subusers
* @subpackage com_subusers
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down Expand Up @@ -81,7 +82,7 @@ protected function getListQuery()
$db = $this->getDbo();
$query = $db->getQuery(true);

$query->select(array('a.*','b.name as role_name', 'b.client as role_client', 'c.name as action_name', 'c.code as action_code'));
$query->select(array('a.*', 'b.name as role_name', 'b.client as role_client', 'c.name as action_name', 'c.code as action_code'));
$query->from('`#__tjsu_role_action_map` AS a');
$query->join('INNER', $db->quoteName('#__tjsu_roles', 'b') . ' ON (' . $db->quoteName('a.role_id') . ' = ' . $db->quoteName('b.id') . ')');
$query->join('INNER', $db->quoteName('#__tjsu_actions', 'c') . ' ON (' . $db->quoteName('a.action_id') . ' = ' . $db->quoteName('c.id') . ')');
Expand Down
Loading

0 comments on commit 9fd8f56

Please sign in to comment.