Allow other users to save photos into another user's album. Fixes bug #11228.
This commit is contained in:
parent
c4ab124380
commit
1f49737ae7
4 changed files with 16 additions and 11 deletions
|
|
@ -738,6 +738,19 @@ sub update {
|
|||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 validParent ( )
|
||||
|
||||
Override validParent to only allow GalleryAlbums to hold GalleryFiles.
|
||||
|
||||
=cut
|
||||
|
||||
sub validParent {
|
||||
my ($class, $session) = @_;
|
||||
return $session->asset->isa('WebGUI::Asset::Wobject::GalleryAlbum');
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 view ( )
|
||||
|
|
|
|||
|
|
@ -306,10 +306,7 @@ sub canEdit {
|
|||
my $form = $self->session->form;
|
||||
|
||||
# Handle adding a photo
|
||||
if ( $form->get("func") eq "add" ) {
|
||||
return $self->canAddFile;
|
||||
}
|
||||
elsif ( $form->get("func") eq "editSave" && $form->get("className") eq __PACKAGE__ ) {
|
||||
if ( $form->get("func") eq "add" || $form->get("func") eq "editSave" ) {
|
||||
return $self->canAddFile;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue