fuck user management
This commit is contained in:
parent
64b8845e73
commit
c494b412a3
3 changed files with 16 additions and 3 deletions
|
@ -10,7 +10,8 @@
|
||||||
|
|
||||||
"20150427",
|
"20150427",
|
||||||
"20150427.1",
|
"20150427.1",
|
||||||
"20150427.2"
|
"20150427.2",
|
||||||
|
"20150427.3"
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -712,6 +713,15 @@
|
||||||
"change": "Fixed bug caused by bug fix in login process (ironic)."
|
"change": "Fixed bug caused by bug fix in login process (ironic)."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
"20150427.3": [
|
||||||
|
|
||||||
|
{
|
||||||
|
"type": "FIX",
|
||||||
|
"change": "Fixed bug in rank checking function (didn't decode the json string)."
|
||||||
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -650,11 +650,14 @@ class Users {
|
||||||
if(in_array($user['rank_main'], $ranks))
|
if(in_array($user['rank_main'], $ranks))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Decode the json for the user's ranks
|
||||||
|
$uRanks = json_decode($user['ranks'], true);
|
||||||
|
|
||||||
// If not go over all ranks and check if the user has them
|
// If not go over all ranks and check if the user has them
|
||||||
foreach($ranks as $rank) {
|
foreach($ranks as $rank) {
|
||||||
|
|
||||||
// We check if $rank is in $user['ranks'] and if yes return true
|
// We check if $rank is in $user['ranks'] and if yes return true
|
||||||
if(in_array($rank, $user['ranks']))
|
if(in_array($rank, $uRanks))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
namespace Sakura;
|
namespace Sakura;
|
||||||
|
|
||||||
// Define Sakura version
|
// Define Sakura version
|
||||||
define('SAKURA_VERSION', '20150427.2');
|
define('SAKURA_VERSION', '20150427.3');
|
||||||
define('SAKURA_VLABEL', 'Heliotrope');
|
define('SAKURA_VLABEL', 'Heliotrope');
|
||||||
define('SAKURA_VTYPE', 'Development');
|
define('SAKURA_VTYPE', 'Development');
|
||||||
define('SAKURA_COLOUR', '#DF73FF');
|
define('SAKURA_COLOUR', '#DF73FF');
|
||||||
|
|
Reference in a new issue