X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2Fcommon.lib.php;h=69c38b731e63a867d6530c7d99faf96f1bd5f1e8;hb=6c7a98f61e74aeae700b523729abb49ff19d3704;hp=e9f9332777963d8f90a659915f2db8aeada6ba5d;hpb=e4c40a490a8c9477cab1d41b786aa7aaa5e930d6;p=timetracker.git diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index e9f93327..69c38b73 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -325,30 +325,9 @@ function ttValidCondition($val, $emptyValid = true) return true; } -// ttAccessCheck is used to check whether user is allowed to proceed. This function is used -// as an initial check on all publicly available pages. -function ttAccessCheck($required_rights) -{ - global $auth; - global $user; - - // Redirect to login page if user is not authenticated. - if (!$auth->isAuthenticated()) { - header('Location: login.php'); - exit(); - } - - // Check rights. - if (!($required_rights & $user->rights_mask)) - return false; - - return true; -} - // ttAccessAllowed checks whether user is allowed access to a particular page. -// This function is a replacement for ttAccessCheck above as part of roles revamp. -// To be used as an initial check on all publicly available pages -// (except login.php and register.php where we don't have to check). +// It is used as an initial check on all publicly available pages +// (except login.php, register.php, and others where we don't have to check). function ttAccessAllowed($required_right) { global $auth;