Author: nathangray
New Revision: 54237
URL: http://svn.stylite.de/viewvc/egroupware?rev=54237&view=rev
Log:
Show error message when trying to get calendars with no access.
Modified:
trunk/calendar/inc/class.calendar_ui.inc.php
trunk/calendar/inc/class.calendar_uilist.inc.php
trunk/calendar/js/app.js
Modified: trunk/calendar/inc/class.calendar_ui.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_ui.inc.php?rev=54237&r1=54236&r2=54237&view=diff
— trunk/calendar/inc/class.calendar_ui.inc.php (original)
+++ trunk/calendar/inc/class.calendar_ui.inc.php Wed Nov 11 00:31:55 2015
@@ -179,10 +179,10 @@
*
* @return boolean/string false if there’s no error or string with error-message
*/
- function check_owners_access()
- function check_owners_access($users = null, &$no_access = array())
{
$no_access = $no_access_group = array();
-
$owner_array = explode(',',$this->owner);
-
$owner_array = $users ? $users : explode(',',$this->owner); foreach($owner_array as $idx => $owner) { $owner = trim($owner);
@@ -205,8 +205,10 @@
}
if (count($no_access))
{
-
egw_framework::message(lang('Access denied to the calendar of %1 !!!',implode(', ',$no_access)),'error');
-
$message = lang('Access denied to the calendar of %1 !!!',implode(', ',$no_access)); -
egw_framework::message($message,'error'); $this->owner = implode(',',$owner_array); -
return $message; } if (count($no_access_group)) {
Modified: trunk/calendar/inc/class.calendar_uilist.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_uilist.inc.php?rev=54237&r1=54236&r2=54237&view=diff
— trunk/calendar/inc/class.calendar_uilist.inc.php (original)
+++ trunk/calendar/inc/class.calendar_uilist.inc.php Wed Nov 11 00:31:55 2015
@@ -480,9 +480,15 @@
$wv=0;
$dv=0;
-
// Add in some select options $users = is_array($search_params['users']) ? $search_params['users'] : explode(',',$search_params['users']); -
if($message = $this->check_owners_access($users,$no_access)) -
{ -
egw_json_response::get()->error($message); -
} -
foreach($users as $owner) { if(!is_int($owner) && $this->bo->resources[$owner[0]])
Modified: trunk/calendar/js/app.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/js/app.js?rev=54237&r1=54236&r2=54237&view=diff
— trunk/calendar/js/app.js (original)
+++ trunk/calendar/js/app.js Wed Nov 11 00:31:55 2015
@@ -198,6 +198,9 @@
* Observer method receives update notifications from all applications
*
* App is responsible for only reacting to “messages” it is interested in!
-
-
- Calendar binds listeners to the data cache, so if the data is updated, the widget
-
- will automatically update itself.
- @param {string} _msg message (already translated) to show, eg. ‘Entry deleted’
- @param {string} _app application name
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs