From e1926ed2176929cd8b572f56626ad6df57b8fe65 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 08:21:18 +0200 Subject: [PATCH] add more documentation --- inc/inc.ClassAccessOperation.php | 7 +++++-- inc/inc.ClassViewCommon.php | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index d5e2d5732..cd6acdbca 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -348,14 +348,17 @@ class SeedDMS_AccessOperation { * Check for access permission on view * * If the parameter $view is an array then each element is considered the - * name of a view and true will be returned if one is accessible. + * name of a view and true will be returned if one of them is accessible. * Whether access is allowed also depends on the currently logged in user * stored in the view object. If the user is an admin the access * on a view must be explicitly disallowed. For regular users the access * must be explicitly allowed. * + * If advanced access control is turn off, this function will always return + * true for admins and false for other users. + * * @param mixed $view Instanz of view, name of view or array of view names - * @param string $get query parameters + * @param string $get query parameters possible containing the element 'action' * @return boolean true if access is allowed, false if access is disallowed * no specific access right is set, otherwise false */ diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index c5d199a6b..42dab1cf2 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -171,10 +171,10 @@ class SeedDMS_View_Common { * Check if the access on the view with given name or the current view itself * may be accessed. * - * The function behaves differently for admins and other users. For admins - * a view must be explitly disallowed for this function to return false. - * For other users access on a view must be explicitly allow for the this - * function to return true. + * The function requires the parameter 'accessobject' to be available in the + * view, because it calls SeedDMS_AccessOperation::check_view_access() + * to check access rights. If the the optional $name is not set the + * current view is used. * * @param string|array $name name of view or list of view names * @return boolean true if access is allowed otherwise false