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,14 +192,16 @@ 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){
|
||||||
$arr[] = array(
|
if($document->getAccessMode($user) >= M_READ) {
|
||||||
'start'=>date('Y-m-d', $document->getExpires()),
|
$arr[] = array(
|
||||||
'allDay'=>true,
|
'start'=>date('Y-m-d', $document->getExpires()),
|
||||||
'color'=>'#ff4455',
|
'allDay'=>true,
|
||||||
'title'=>$document->getName()."\nexpires",
|
'color'=>'#ff4455',
|
||||||
'documentid'=> $document->getID(),
|
'title'=>$document->getName()."\nexpires",
|
||||||
'eventtype'=> $eventtype,
|
'documentid'=> $document->getID(),
|
||||||
);
|
'eventtype'=> $eventtype,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -210,14 +212,16 @@ 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){
|
||||||
$arr[] = array(
|
if($document->getAccessMode($user) >= M_READ) {
|
||||||
'start'=>$document->getAttribute($attrdef)->getValue(),
|
$arr[] = array(
|
||||||
'allDay'=>true,
|
'start'=>$document->getAttribute($attrdef)->getValue(),
|
||||||
'color'=>'#4455ff',
|
'allDay'=>true,
|
||||||
'title'=>$document->getName()."\n".$attrdef->getName(),
|
'color'=>'#4455ff',
|
||||||
'documentid'=> $document->getID(),
|
'title'=>$document->getName()."\n".$attrdef->getName(),
|
||||||
'eventtype'=> $eventtype,
|
'documentid'=> $document->getID(),
|
||||||
);
|
'eventtype'=> $eventtype,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user