check view access

This commit is contained in:
Uwe Steinmann 2018-02-05 10:28:06 +01:00
parent 51f3416c70
commit 28a0860824
6 changed files with 18 additions and 0 deletions

View File

@ -31,6 +31,9 @@ include("../inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if (!$accessop->check_view_access($view, $_GET)) {
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));
}
if ($user->isGuest()) {
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));

View File

@ -29,6 +29,9 @@ include("../inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if (!$accessop->check_view_access($view, $_GET)) {
UI::exitError(getMLText("my_account"),getMLText("access_denied"), false, $isajax);
}
if ($user->isGuest()) {
UI::exitError(getMLText("my_account"),getMLText("access_denied"));

View File

@ -31,6 +31,9 @@ include("../inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if (!$accessop->check_view_access($view, $_GET)) {
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));
}
if ($user->isGuest()) {
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));

View File

@ -31,6 +31,9 @@ include("../inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if (!$accessop->check_view_access($view, $_GET)) {
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));
}
if ($user->isGuest()) {
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));

View File

@ -29,6 +29,9 @@ include("../inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if (!$accessop->check_view_access($view, $_GET)) {
UI::exitError(getMLText("my_account"),getMLText("access_denied"), false, $isajax);
}
if ($user->isGuest()) {
UI::exitError(getMLText("my_account"),getMLText("access_denied"));

View File

@ -31,6 +31,9 @@ include("../inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if (!$accessop->check_view_access($view, $_GET)) {
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));
}
if ($user->isGuest()) {
UI::exitError(getMLText("my_documents"),getMLText("access_denied"));