mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-17 07:01:20 +00:00
check for access rights of documents
This commit is contained in:
parent
8776173ec9
commit
d0c5905c0e
|
@ -192,6 +192,7 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
|
||||||
if(mktime(23,59,59, $end[1], $end[2], $end[0]) > time()) {
|
if(mktime(23,59,59, $end[1], $end[2], $end[0]) > time()) {
|
||||||
$documents = $dms->getDocumentsExpired($this->params['end']);
|
$documents = $dms->getDocumentsExpired($this->params['end']);
|
||||||
foreach ($documents as $document){
|
foreach ($documents as $document){
|
||||||
|
if($document->getAccessMode($user) >= M_READ) {
|
||||||
$arr[] = array(
|
$arr[] = array(
|
||||||
'start'=>date('Y-m-d', $document->getExpires()),
|
'start'=>date('Y-m-d', $document->getExpires()),
|
||||||
'allDay'=>true,
|
'allDay'=>true,
|
||||||
|
@ -202,6 +203,7 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'attrdate':
|
case 'attrdate':
|
||||||
if(mktime(23,59,59, $end[1], $end[2], $end[0]) > time()) {
|
if(mktime(23,59,59, $end[1], $end[2], $end[0]) > time()) {
|
||||||
|
@ -210,6 +212,7 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
|
||||||
if($attrdef->getType() == \SeedDMS_Core_AttributeDefinition::type_date) {
|
if($attrdef->getType() == \SeedDMS_Core_AttributeDefinition::type_date) {
|
||||||
$documents = $attrdef->getObjects($this->params['start'], 0, O_GTEQ);
|
$documents = $attrdef->getObjects($this->params['start'], 0, O_GTEQ);
|
||||||
foreach ($documents['docs'] as $document){
|
foreach ($documents['docs'] as $document){
|
||||||
|
if($document->getAccessMode($user) >= M_READ) {
|
||||||
$arr[] = array(
|
$arr[] = array(
|
||||||
'start'=>$document->getAttribute($attrdef)->getValue(),
|
'start'=>$document->getAttribute($attrdef)->getValue(),
|
||||||
'allDay'=>true,
|
'allDay'=>true,
|
||||||
|
@ -222,6 +225,7 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'action':
|
case 'action':
|
||||||
/* These are all operations which added a new version, an attachment
|
/* These are all operations which added a new version, an attachment
|
||||||
|
|
Loading…
Reference in New Issue
Block a user