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

Fix : getRights has been replaced by loadRights in V20 #32603

Merged
merged 3 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/initdata/generate-invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@

$fuser = new User($db);
$fuser->fetch(mt_rand(1, 2));
$fuser->getRights();
$fuser->loadRights();

$result=$object->create($fuser);
if ($result >= 0) {
Expand Down
2 changes: 1 addition & 1 deletion dev/initdata/generate-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@

$fuser = new User($db);
$fuser->fetch($listofuserid[mt_rand(0, 2)]);
$fuser->getRights();
$fuser->loadRights();

$db->begin();

Expand Down
2 changes: 1 addition & 1 deletion dev/initdata/generate-proposal.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@

$fuser = new User($db);
$fuser->fetch(mt_rand(1, 2));
$fuser->getRights();
$fuser->loadRights();

$object->contactid = $contids[$socids[$socid]][0];
$object->socid = $socids[$socid];
Expand Down
4 changes: 2 additions & 2 deletions test/phpunit/SupplierProposalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected function setUp(): void

// Set permission not set by default sql sample
$user->addrights(0, 'supplier_proposal');
$user->getrights('supplier_proposal', 1);
$user->loadRights('supplier_proposal', 1);
}

/**
Expand Down Expand Up @@ -183,7 +183,7 @@ public function testSupplierProposalValid($localobject)
$result = $user->addrights(0, 'supplier_proposal');
$this->assertLessThan($result, 0);

$result = $user->getrights('supplier_proposal', 1);
$result = $user->loadRights('supplier_proposal', 1);
//$this->assertLessThan($result, 0);

$result = $localobject->valid($user);
Expand Down
Loading