Profile permissions belong in one table, because scattered they hid a capability chat was never meant to have
This commit is contained in:
@@ -252,7 +252,7 @@ if ($action === 'ask') {
|
||||
if ($scope !== '' && !vv_ai_scope_ok($scope)) $scope = '';
|
||||
|
||||
// The retrieval filter only means anything to the profile that retrieves.
|
||||
$kind = $profile === 'varaverk' ? trim($_POST['kind'] ?? '') : '';
|
||||
$kind = vv_ai_profile_can($profile, 'kind_filter') ? trim($_POST['kind'] ?? '') : '';
|
||||
if ($kind !== '' && !in_array($kind, VV_AI_KINDS, true)) {
|
||||
echo json_encode(['ok' => false, 'error' => 'Unknown kind: ' . $kind]); exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user