Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2024-05-13 18:17:56 +02:00
commit ce0de15ce1
3 changed files with 8 additions and 3 deletions

View File

@ -292,6 +292,8 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 5.1.35 Changes in version 5.1.35
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
- check access rights on EditDocumentFile and RemoveDocumentFile
- allow to set expiration dates in the past again
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 5.1.34 Changes in version 5.1.34

View File

@ -72,6 +72,7 @@ $(document).ready( function() {
$options = array(); $options = array();
$options[] = array('never', getMLText('does_not_expire')); $options[] = array('never', getMLText('does_not_expire'));
$options[] = array('date', getMLText('expire_by_date'), $expdate != ''); $options[] = array('date', getMLText('expire_by_date'), $expdate != '');
$options[] = array('today', getMLText('expire_today').' ('.date($df, getTsByPeriod('today', 's')).')');
$options[] = array('tomorrow', getMLText('expire_tomorrow').' ('.date($df, getTsByPeriod('tomorrow', 's')).')'); $options[] = array('tomorrow', getMLText('expire_tomorrow').' ('.date($df, getTsByPeriod('tomorrow', 's')).')');
$options[] = array('1w', getMLText('expire_in_1w').' ('.date($df, getTsByPeriod('1w', 's')).')'); $options[] = array('1w', getMLText('expire_in_1w').' ('.date($df, getTsByPeriod('1w', 's')).')');
$options[] = array('1m', getMLText('expire_in_1m').' ('.date($df, getTsByPeriod('1m', 's')).')'); $options[] = array('1m', getMLText('expire_in_1m').' ('.date($df, getTsByPeriod('1m', 's')).')');
@ -92,7 +93,7 @@ $(document).ready( function() {
); );
$this->formField( $this->formField(
getMLText("expires"), getMLText("expires"),
$this->getDateChooser($expdate, "expdate", $this->params['session']->getLanguage(), '', '+1d') $this->getDateChooser($expdate, "expdate", $this->params['session']->getLanguage(), '', '') // set last parameter to '+1d' if dates in the past are not allowed
); );
$this->contentContainerEnd(); $this->contentContainerEnd();
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save')); $this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));

View File

@ -384,7 +384,9 @@ $(document).ready( function() {
$this->showActions($items); $this->showActions($items);
$items = []; $items = [];
if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID())) { if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID())) {
if($accessobject->check_view_access('RemoveDocumentFile'))
$items[] = array('link'=>$this->html_url('RemoveDocumentFile', array('documentid'=>$document->getID(), 'fileid'=>$file->getID())), 'icon'=>'remove', 'label'=>'delete'); $items[] = array('link'=>$this->html_url('RemoveDocumentFile', array('documentid'=>$document->getID(), 'fileid'=>$file->getID())), 'icon'=>'remove', 'label'=>'delete');
if($accessobject->check_view_access('EditDocumentFile'))
$items[] = array('link'=>$this->html_url('EditDocumentFile', array('documentid'=>$document->getID(), 'fileid'=>$file->getID())), 'icon'=>'edit', 'label'=>'edit'); $items[] = array('link'=>$this->html_url('EditDocumentFile', array('documentid'=>$document->getID(), 'fileid'=>$file->getID())), 'icon'=>'edit', 'label'=>'edit');
} }
$this->showActions($items); $this->showActions($items);