mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01:00
* InfoLog: config to handle status "archive" as unchangeable (or only changeable by an admin)
This commit is contained in:
parent
ffc6a533a4
commit
cf22c75686
@ -120,11 +120,15 @@ class infolog_bo
|
||||
*/
|
||||
var $user;
|
||||
/**
|
||||
* History loggin: ''=no, 'history'=history & delete allowed, 'history_admin_delete', 'history_no_delete'
|
||||
* History logging: ''=no, 'history'=history & delete allowed, 'history_admin_delete', 'history_no_delete'
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $history;
|
||||
/**
|
||||
* @var string "yes": archived entries can not be changed, "but_admins" noone but admins can change archived entries
|
||||
*/
|
||||
var $archived_readonly;
|
||||
/**
|
||||
* Instance of infolog_tracking, only instaciated if needed!
|
||||
*
|
||||
@ -286,6 +290,18 @@ class infolog_bo
|
||||
}
|
||||
$this->history = $config_data['history'];
|
||||
|
||||
if (($this->archived_readonly = $config_data['archived_readonly'] ?? null))
|
||||
{
|
||||
// add "archive" status to all types
|
||||
foreach($this->status as $type => &$statis)
|
||||
{
|
||||
if ($type !== 'defaults' && !isset($statis['archive']))
|
||||
{
|
||||
$statis['archive'] = 'archive';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->limit_modified_n_month = $config_data['limit_modified_n_month'] ?? null;
|
||||
}
|
||||
// sort types by there translation
|
||||
@ -332,7 +348,7 @@ class infolog_bo
|
||||
}
|
||||
|
||||
/**
|
||||
* check's if user has the requiered rights on entry $info_id
|
||||
* check's if user has the required rights on entry $info_id
|
||||
*
|
||||
* @param int|array $info data or info_id of infolog entry to check
|
||||
* @param int $required_rights ACL::{READ|EDIT|ADD|DELETE}|infolog_bo::ACL_UNDELETE
|
||||
@ -364,10 +380,16 @@ class infolog_bo
|
||||
|
||||
if (!isset($access))
|
||||
{
|
||||
// handle delete for the various history modes
|
||||
if (!is_array($info) && !($info = $this->so->read(array('info_id' => $info_id)))) return false;
|
||||
|
||||
if ($info['info_status'] == 'deleted' &&
|
||||
// handle edit for archived entries
|
||||
if ($info['info_status'] === 'archive' && $this->archived_readonly && $required_rights == ACL::EDIT &&
|
||||
($this->archived_readonly === 'yes' || empty($GLOBALS['egw_info']['users']['apps']['admin'])))
|
||||
{
|
||||
$access = false;
|
||||
}
|
||||
// handle delete for the various history modes
|
||||
elseif ($info['info_status'] === 'deleted' &&
|
||||
($required_rights == Acl::EDIT || // no edit rights for deleted entries
|
||||
$required_rights == Acl::ADD || // no add rights for deleted entries
|
||||
$required_rights == Acl::DELETE && ($this->history == 'history_no_delete' || // no delete at all!
|
||||
|
@ -2631,6 +2631,7 @@ class infolog_ui
|
||||
Api\Config::save_value('responsible_edit', $this->bo->responsible_edit, 'infolog');
|
||||
Api\Config::save_value('implicit_rights', $this->bo->implicit_rights = $content['implicit_rights'] == 'edit' ? 'edit' : 'read', 'infolog');
|
||||
Api\Config::save_value('history', $this->bo->history = $content['history'], 'infolog');
|
||||
Api\Config::save_value('archived_readonly', $this->bo->archived_readonly = $content['archived_readonly'], 'infolog');
|
||||
Api\Config::save_value('index_load_cfs', implode(',', (array)$content['index_load_cfs']), 'infolog');
|
||||
Api\Config::save_value('sub_prefix', $content['sub_prefix'], 'infolog');
|
||||
Api\Config::save_value('allow_past_due_date', $content['allow_past_due_date'], 'infolog');
|
||||
|
@ -192,6 +192,8 @@ enter a custom phone/email, leave empty if linked entry should be used infolog d
|
||||
enter a textual description of the log-entry infolog de Geben Sie eine textliche Beschreibung des Eintrags ein
|
||||
enter the query pattern infolog de Geben Sie ein Suchmuster ein
|
||||
entry and all files infolog de Eintrag und alle Dateien
|
||||
entry can not be changed anymore, after status is set infolog de Eintrag kann NICHT mehr geändert werden, nach dem der Status gesetzt wurde
|
||||
entry can not be changed by anybody, but egroupware admins infolog de Eintrag kann NICHT mehr geändert werden von jedem, außer EGroupware Administratoren
|
||||
error: importing the ical infolog de Fehler beim Import der iCal
|
||||
error: no mail (mailbox / uid) given! infolog de Fehler: keine Mail (Mailbox / UID) angegeben!
|
||||
error: saving the entry infolog de Fehler: beim Speichern des Eintrags
|
||||
@ -223,6 +225,7 @@ general fields: infolog de Allgemeine Felder:
|
||||
general settings infolog de Allgemeine Einstellungen:
|
||||
global categories infolog de Globale Kategorien
|
||||
group owner for infolog de Gruppeneigentümer für
|
||||
handling of status 'archived' infolog de Behandlung des Status 'Archiviert'
|
||||
high infolog de Hoch
|
||||
history infolog de Historie
|
||||
history logging infolog de Protokollierung der Historie
|
||||
@ -313,6 +316,7 @@ no entries found, try again ... infolog de Kein Einträge gefunden, noch einmal
|
||||
no filter infolog de Kein Filter
|
||||
no links or attachments infolog de Keine Verknüpfungen oder Anhänge
|
||||
no project infolog de Kein Projekt
|
||||
no special handling infolog de Keine spezielle Behandlung
|
||||
nonactive infolog de Nicht aktiv
|
||||
none infolog de Keine
|
||||
normal infolog de Normal
|
||||
|
@ -192,6 +192,8 @@ enter a custom phone/email, leave empty if linked entry should be used infolog e
|
||||
enter a textual description of the log-entry infolog en Enter text description of the InfoLog entry
|
||||
enter the query pattern infolog en Enter the query pattern
|
||||
entry and all files infolog en Entry and all files
|
||||
entry can not be changed anymore, after status is set infolog en Entry can NOT be changed anymore, after status is set
|
||||
entry can not be changed by anybody, but egroupware admins infolog en Entry can NOT be changed by anybody, but EGroupware admins
|
||||
error: importing the ical infolog en Error: importing the iCal
|
||||
error: no mail (mailbox / uid) given! infolog en Error: no mail (Mailbox / UID) given!
|
||||
error: saving the entry infolog en Error saving the entry!
|
||||
@ -223,6 +225,7 @@ general fields: infolog en General fields:
|
||||
general settings infolog en General settings
|
||||
global categories infolog en Global categories
|
||||
group owner for infolog en Group owner for
|
||||
handling of status 'archived' infolog en Handling of status 'archived'
|
||||
high infolog en High
|
||||
history infolog en History
|
||||
history logging infolog en History logging
|
||||
@ -313,6 +316,7 @@ no entries found, try again ... infolog en No entries found, try again ...
|
||||
no filter infolog en No filter
|
||||
no links or attachments infolog en No links or attachments
|
||||
no project infolog en No project
|
||||
no special handling infolog en No special handling
|
||||
nonactive infolog en Non active
|
||||
none infolog en None
|
||||
normal infolog en Normal
|
||||
|
@ -29,6 +29,14 @@
|
||||
<et2-description value="History logging and deleting of items"></et2-description>
|
||||
<et2-select id="history"></et2-select>
|
||||
</row>
|
||||
<row>
|
||||
<et2-description value="Handling of status 'archived'"></et2-description>
|
||||
<et2-select id="archived_readonly">
|
||||
<option value="">{No special handling} ({Default})</option>
|
||||
<option value="yes">Entry can NOT be changed anymore, after status is set</option>
|
||||
<option value="but_admins">Entry can NOT be changed by anybody, but EGroupware admins</option>
|
||||
</et2-select>
|
||||
</row>
|
||||
<row class="th">
|
||||
<et2-description value="Other configurations" span="all"></et2-description>
|
||||
</row>
|
||||
@ -46,7 +54,7 @@
|
||||
</row>
|
||||
<row>
|
||||
<et2-description value="Prefix for sub-entries (default: Re:)"></et2-description>
|
||||
<et2-textbox id="sub_prefix" noLang="1"></et2-textbox>
|
||||
<et2-textbox id="sub_prefix" noLang="1" placeholder="Re:"></et2-textbox>
|
||||
</row>
|
||||
<row>
|
||||
<et2-description value="Fields to exclude when creating a sub-entry:"></et2-description>
|
||||
@ -100,7 +108,7 @@
|
||||
<template id="infolog.config" template="" lang="" group="0" version="1.9.001">
|
||||
<et2-vbox>
|
||||
<et2-description id="msg" span="all" class="message"></et2-description>
|
||||
<et2-tabbox id="configuration|notification">
|
||||
<et2-tabbox id="configuration|notification" cfDisabled="true">
|
||||
<tabs>
|
||||
<tab id="configuration" label="Configuration"/>
|
||||
<tab id="notification" label="Notification"/>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<row class="th">
|
||||
<et2-vbox>
|
||||
<et2-nextmatch-header-filter id="info_type" noLang="1" emptyLabel="Type"/>
|
||||
<et2-nextmatch-header-filter align="center" id="info_status" class="selectboxFullWidth" emptyLabel="Status"/>
|
||||
<et2-nextmatch-header-filter id="info_status" emptyLabel="Status"></et2-nextmatch-header-filter>
|
||||
<nextmatch-sortheader align="right" label="Completed" id="info_percent"/>
|
||||
</et2-vbox>
|
||||
<grid width="100%" spacing="0" padding="0">
|
||||
|
Loading…
Reference in New Issue
Block a user