mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
add access check
This commit is contained in:
parent
c56d026679
commit
224172f785
|
@ -30,6 +30,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"));
|
||||
}
|
||||
|
||||
if ($user->isGuest()) {
|
||||
UI::exitError(getMLText("my_account"),getMLText("access_denied"));
|
||||
|
|
|
@ -30,6 +30,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"));
|
||||
|
|
|
@ -29,6 +29,9 @@ include("../inc/inc.Authentication.php");
|
|||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1]);
|
||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||
if (!$accessop->check_view_access($view, $_GET)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
$allUsers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||
|
|
|
@ -34,6 +34,9 @@ require_once("SeedDMS/Preview.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_transmittals"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if ($user->isGuest()) {
|
||||
UI::exitError(getMLText("my_transmittals"),getMLText("access_denied"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user