fix head fa access issue
This commit is contained in:
@@ -522,7 +522,7 @@ class FilesController extends Controller
|
||||
$roles[] = $activeRole;
|
||||
}
|
||||
|
||||
foreach (['administrator', 'administrative staff', 'principal', 'teacher', 'teacher_assistant'] as $role) {
|
||||
foreach (['administrator', 'administrative staff', 'principal', 'teacher', 'teacher_assistant', 'head fa', 'head of fa', 'head_of_fa', 'financial_contributor'] as $role) {
|
||||
if (in_array($role, $roles, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2293,6 +2293,10 @@ private function getGradeLevel($grade): array
|
||||
'administrative staff',
|
||||
'principal',
|
||||
'admin',
|
||||
'head fa',
|
||||
'head of fa',
|
||||
'head_of_fa',
|
||||
'financial_contributor',
|
||||
]);
|
||||
|
||||
if ($userId <= 0 || (! $isStaff && $userId !== $parentId)) {
|
||||
|
||||
@@ -1685,7 +1685,7 @@ class PaymentController extends ResourceController
|
||||
$roles[] = $activeRole;
|
||||
}
|
||||
|
||||
$staffRoles = ['administrator', 'administrative staff', 'principal', 'teacher', 'teacher_assistant'];
|
||||
$staffRoles = ['administrator', 'administrative staff', 'principal', 'teacher', 'teacher_assistant', 'head fa', 'head of fa', 'head_of_fa', 'financial_contributor'];
|
||||
foreach ($staffRoles as $role) {
|
||||
if (in_array($role, $roles, true)) {
|
||||
return true;
|
||||
|
||||
@@ -1414,7 +1414,7 @@ class RefundController extends BaseController
|
||||
$roles[] = $activeRole;
|
||||
}
|
||||
|
||||
foreach (['administrator', 'administrative staff', 'principal', 'teacher', 'teacher_assistant'] as $role) {
|
||||
foreach (['administrator', 'administrative staff', 'principal', 'teacher', 'teacher_assistant', 'head fa', 'head of fa', 'head_of_fa', 'financial_contributor'] as $role) {
|
||||
if (in_array($role, $roles, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user