Changeset 487
- Timestamp:
- 10/04/09 17:11:07 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r486 r487 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) = @_;238 228 239 229 # populating default value … … 268 258 269 259 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 {285 260 my ($self, $otype, $id) = @_; 286 261 my $pclass = $self->_load_obj_class($otype); … … 409 384 } 410 385 } elsif(!$options{nocreate}) { 411 if ($self-> _create_c_object($srcobj->type, $srcobj->id, %data)) {386 if ($self->create_c_object($srcobj->type, $srcobj->id, %data)) { 412 387 return 'CREATE' 413 388 } else {
Note: See TracChangeset
for help on using the changeset viewer.