Changeset 488 for LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
- Timestamp:
- 10/04/09 17:11:58 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r487 r488 226 226 sub create_c_object { 227 227 my ($self, $otype, $id, %cdata) = @_; 228 $self->check_acl($otype, '@CREATE', 'w') or do { 229 $self->log(LA_WARN, 'permission denied to create object type %s', 230 $otype); 231 return; 232 }; 233 $self->_create_c_object($otype, $id, %cdata); 234 } 235 236 sub _create_c_object { 237 my ($self, $otype, $id, %cdata) = @_; 228 238 229 239 # populating default value … … 258 268 259 269 sub delete_object { 270 my ($self, $otype, $id) = @_; 271 my $obj = $self->get_object($otype, $id) or do { 272 $self->log(LA_WARN, 'Cannot delete %s/%s: no such object', 273 $otype, $id); 274 return; 275 }; 276 $self->check_acl($obj, '@DELETE', 'w') or do { 277 $self->log(LA_WARN, 'permission denied to delete %s/%s', 278 $otype, $id); 279 return; 280 }; 281 $self->_delete_object($otype, $id); 282 } 283 284 sub _delete_object { 260 285 my ($self, $otype, $id) = @_; 261 286 my $pclass = $self->_load_obj_class($otype); … … 384 409 } 385 410 } elsif(!$options{nocreate}) { 386 if ($self-> create_c_object($srcobj->type, $srcobj->id, %data)) {411 if ($self->_create_c_object($srcobj->type, $srcobj->id, %data)) { 387 412 return 'CREATE' 388 413 } else {
Note: See TracChangeset
for help on using the changeset viewer.