Skip to content

Commit

Permalink
Resolve Initial Acls not being set
Browse files Browse the repository at this point in the history
- instead of directly assigning the incoming $role_set to _roles we instead
  utilize the function setRoles which will take care of keeping the acls in
  sync.
- remove the initialization of _acls to an empty array() as this would override
  the work done by setRoles.

- Also needed to remove the additional acl-import in
  integration_tests/scripts/bootstrap.sh as we need to see if the changes made
  to XDUser work as expected.
  • Loading branch information
ryanrath committed Jul 21, 2017
1 parent bc3e8b3 commit 85ce7b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions classes/XDUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function __construct($username = NULL, $password = NULL, $email_address = NO_EMA
$this->_middleName = $middle_name;
$this->_lastName = $last_name;

$this->_roles = $role_set;
$this->setRoles($role_set);

// Role Checking ====================

Expand Down Expand Up @@ -171,8 +171,6 @@ function __construct($username = NULL, $password = NULL, $email_address = NO_EMA

$this->_primary_role = \User\aRole::factory($primary_role_name);
$this->_active_role = \User\aRole::factory($primary_role_name);

$this->_acls = array();
}//construct

// ---------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ then
xdmod-import-csv -t names -i $REF_DIR/names.csv
xdmod-ingestor
php /root/bin/createusers.php
# we need to migrate any UserRole records created to user_acls. This is done
# via a script executed by acl-import.
acl-import
fi

if [ "$XDMOD_TEST_MODE" = "upgrade" ];
Expand Down

0 comments on commit 85ce7b2

Please sign in to comment.