From f24c62531a3b683fecf1463e8e6c71aa2245c847 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Fri, 30 Dec 2016 00:52:38 +0100 Subject: [PATCH] inc/ui/collection-edit.php: display only privileges applicable for collections --- inc/ui/collection-edit.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/inc/ui/collection-edit.php b/inc/ui/collection-edit.php index cec16e47..9e62356b 100644 --- a/inc/ui/collection-edit.php +++ b/inc/ui/collection-edit.php @@ -34,8 +34,7 @@ $editor->AddAttribute('mode', 'id', 'fld_mode'); $editor->SetWhere( 'collection_id='.$id ); $privilege_names = array( 'read', 'write-properties', 'write-content', 'unlock', 'read-acl', 'read-current-user-privilege-set', - 'bind', 'unbind', 'write-acl', 'read-free-busy', 'schedule-deliver-invite', 'schedule-deliver-reply', - 'schedule-query-freebusy', 'schedule-send-invite', 'schedule-send-reply', 'schedule-send-freebusy' ); + 'bind', 'unbind', 'write-acl', 'read-free-busy' ); $params = array( ':session_principal' => $session->principal_id, @@ -193,10 +192,10 @@ $privilege_xlate = array( function collection_privilege_format_function( $value, $column, $row ) { global $privilege_xlate; - $privs = bits_to_privilege($value); + $privs = bits_to_privilege($value, 'calendar'); $formatted = ''; foreach( $privs AS $k => $v ) { - $formatted .= ($formatted == '' ? '' : ' , '); + $formatted .= ($formatted == '' ? '' : ', '); $v = preg_replace( '{^.*:}', '', $v ); $formatted .= (isset($privilege_xlate[$v]) ? $privilege_xlate[$v] : $v ); } @@ -348,10 +347,6 @@ label.privilege { onclick="toggle_privileges('default_privileges', 'read', 'read-free-busy', 'schedule-query-freebusy', 'read-current-user-privilege-set' );"> - -
$privileges_set $prompt_timezone: ##timezone.select## $prompt_schedule_transp: ##schedule_transp.select## @@ -441,10 +436,6 @@ if ( $editor->Available() ) { onclick="toggle_privileges('grant_privileges', 'read', 'read-free-busy', 'schedule-query-freebusy', 'read-current-user-privilege-set' );"> - -
$privileges_set ##$submit_label.submit##