Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes for multiple content assign to single user #10

Open
wants to merge 4 commits into
base: release-1.1.0
Choose a base branch
from

Conversation

sanjivani1812
Copy link
Contributor

  1. src/administrator/includes/rbacl.php
    In this file, I have added array_intersect in check function, because when multiple client_id assign to a single user then only first client_id check. need to check all roles across the system.
  2. src/administrator/models/user.php
    In this file two changes needed
    2.a) In getTable table add table file
    2.b) In getAssociatedContentRole function contentId variable make optional and changed query result to get all role column result.

*
* @since 1.6
*/
public function getAuthorizedActions($agencyId = null, $userId = null, $roleId = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there hardcoded references to com_multiagency ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the variable name.

src/administrator/includes/rbacl.php Show resolved Hide resolved
src/administrator/includes/rbacl.php Outdated Show resolved Hide resolved
src/administrator/includes/rbacl.php Outdated Show resolved Hide resolved
src/administrator/includes/rbacl.php Outdated Show resolved Hide resolved
src/administrator/includes/rbacl.php Outdated Show resolved Hide resolved
if (!empty($userRoleId))
{
$db = JFactory::getDBO();
$subInQuery = $db->getQuery(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sanjivani1812 Move the DB operations in the model

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thite-amol - getRoleByUser function having DB operation so I put there. Can please suggest a model name.

src/administrator/includes/rbacl.php Outdated Show resolved Hide resolved
src/administrator/includes/rbacl.php Show resolved Hide resolved
src/administrator/includes/rbacl.php Outdated Show resolved Hide resolved
src/administrator/models/user.php Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants