Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:hashtopolis/server into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
zyronix committed Aug 11, 2023
2 parents 81a7a1a + 81b2b74 commit 9f48878
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dba/AbstractModelFactory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ public function getDB($test = false) {
}
else {
global $CONN;
$dsn = 'mysql:dbname=' . $CONN['db'] . ";host=" . $CONN['server'] . ";port=" . $CONN['port'];
$dsn = 'mysql:dbname=' . $CONN['db'] . ";host=" . $CONN['server'] . ";port=" . $CONN['port'] . ";charset=utf8";
$user = $CONN['user'];
$password = $CONN['pass'];
}
Expand Down
3 changes: 2 additions & 1 deletion src/inc/apiv2/shared.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,8 @@ protected function validateHashlistAccess(Request $request, User $user, String $
*/
protected function validatePermissions(array $required_perms): bool {
// Retrieve permissions from RightGroup part of the User
$group = Factory::getRightGroupFactory()->get($this->user->getId());
$group = Factory::getRightGroupFactory()->get($this->user->getRightGroupId());


if ($group->getPermissions() == 'ALL') {
// Special (legacy) case for administative access, enable all available permissions
Expand Down

0 comments on commit 9f48878

Please sign in to comment.