Use _bo is_permitted() function for consistency, fixes occasional exceptions due to group permissions

This commit is contained in:
Nathan Gray 2011-02-11 18:03:44 +00:00
parent a045b4cc5f
commit ededa8f092
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ class importexport_definition implements importexport_iface_egw_record {
if ( empty( $this->definition ) ) {
throw new Exception('Error: No such definition with identifier :"'.$_identifier.'"!');
}
if ( !( in_array( $this->user, $this->get_allowed_users() ) || $this->definition['owner'] == $this->user || $this->is_admin)) {
if ( !( importexport_definitions_bo::is_permitted($this->get_record_array()) || $this->is_admin)) {
throw new Exception('Error: User "'.$this->user.'" is not permitted to get definition with identifier "'.$_identifier.'"!');
}
$options_data = importexport_arrayxml::xml2array( $this->definition['plugin_options'] );

View File

@ -442,7 +442,7 @@ class importexport_helper_functions {
try {
$definition = new importexport_definition($id);
if($def->is_permitted($definition->get_record_array())) {
$list[$definition->application][$definition->type] = $id;
$list[$definition->application][$definition->type][] = $id;
}
} catch (Exception $e) {
// That one doesn't work, keep going