Exemple #1
0
  
  if (!check_user_attendance($params['event_id'], $obm['uid'])
    || !in_array($params['document_id'], get_calendar_event_document_ids($params['event_id']))) {
    $display['msg'] .= display_err_msg("$l_err_file_access_forbidden");
  } else {
    $doc_q = run_query_document_detail($params['document_id']);
    if ($doc_q->num_rows() == 1) {
      dis_document_file($doc_q);
    } else {
      $display['msg'] .= display_err_msg("$l_no_document !");
    }
  }

} elseif ($action == 'rights_admin') {
///////////////////////////////////////////////////////////////////////////////
  if(Obm_Acl::isAllowed($obm['uid'], 'calendar', $params['entity_id'], "admin") || check_calendar_update_rights($params) ){
    $display['detail'] = dis_calendar_right_dis_admin($params['entity_id']);
  }
  else{
    $err['msg'] = $l_insufficient_permission;
    $display['msg'] .= display_err_msg($err['msg']);
  }

} elseif ($action == 'rights_update') {
///////////////////////////////////////////////////////////////////////////////
  if (OBM_Acl_Utils::updateRights('calendar', $params['entity_id'], $obm['uid'], $params)) {
    $display['msg'] .= display_ok_msg("$l_rights : $l_update_ok");
  } else {
    $display['msg'] .= display_warn_msg($l_of_right_err_auth);
  }
  $display['detail'] = dis_calendar_right_dis_admin($params['entity_id']);
Exemple #2
0
page_close();


if (($action == "index") || ($action == "")) {
///////////////////////////////////////////////////////////////////////////////
  $display["search"] = html_mailshare_search_form($params);
  if ($_SESSION['set_display'] == "yes") {
    $display["result"] = dis_mailshare_search_list("");
  } else {
    $display["msg"] .= display_ok_msg($l_no_display);
  }

} elseif ($action == "rights_admin") {
///////////////////////////////////////////////////////////////////////////////
  if(Obm_Acl::isAllowed($obm['uid'], 'mailbox', $params['entity_id'], "admin") || check_mailbox_update_rights($params) ){
    $display["detail"] = dis_mailbox_right_dis_admin($params["entity_id"]);
  } else {
    $err['msg'] = $l_insufficient_permission;
    $display['msg'] .= display_err_msg($err['msg']);
  }

} elseif ($action == "rights_update") {
///////////////////////////////////////////////////////////////////////////////
  if (OBM_Acl_Utils::updateRights('mailbox', $params['entity_id'], $obm['uid'], $params)) {
    $mailbox_owner_login = get_user_login($params['entity_id']);
    update_mailbox_acl( $mailbox_owner_login, $obm['domain_id'] );
    $display["msg"] .= display_ok_msg("$l_rights : $l_update_ok");
  } else {
    $display["msg"] .= display_warn_msg($l_of_right_err_auth);
  }