Fix group permissions when editing/adding an Event. Fixes bug #11800.
This commit is contained in:
parent
7d59b7382b
commit
e0eaa2e13f
3 changed files with 10 additions and 3 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
- fixed #11785: Article title / URL with äÄöÖüÜ (reopen #11683)
|
- fixed #11785: Article title / URL with äÄöÖüÜ (reopen #11683)
|
||||||
- fixed #11799: 7.8.24->7.9.11 upgrade breaks on custom Paydrivers
|
- fixed #11799: 7.8.24->7.9.11 upgrade breaks on custom Paydrivers
|
||||||
- fixed #11798: Gallery request non existent image
|
- fixed #11798: Gallery request non existent image
|
||||||
|
- fixed #11800: Group to view for new events defaults to 'Everyone'
|
||||||
|
|
||||||
7.9.12
|
7.9.12
|
||||||
- webgui.org homepage gives 404 (#11778)
|
- webgui.org homepage gives 404 (#11778)
|
||||||
|
|
|
||||||
|
|
@ -1345,10 +1345,14 @@ sub processPropertiesFromFormPost {
|
||||||
WebGUI::VersionTag->new($session, $self->get('tagId'))->setWorking;
|
WebGUI::VersionTag->new($session, $self->get('tagId'))->setWorking;
|
||||||
}
|
}
|
||||||
|
|
||||||
### Form is verified
|
### Form is verified, fix properties
|
||||||
# Events are always hidden from navigation
|
if (!$session->form->hasParam('groupIdView')) {
|
||||||
|
$self->update({
|
||||||
|
groupIdView => $self->getParent->get('groupIdView'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!$self->get("groupIdEdit")) {
|
if (!$session->form->hasParam('groupIdEdit')) {
|
||||||
my $groupIdEdit = $self->getParent->get("groupIdEventEdit")
|
my $groupIdEdit = $self->getParent->get("groupIdEventEdit")
|
||||||
|| $self->getParent->get("groupIdEdit")
|
|| $self->getParent->get("groupIdEdit")
|
||||||
;
|
;
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ $properties = {
|
||||||
%{ $properties },
|
%{ $properties },
|
||||||
ownerUserId => $user->userId,
|
ownerUserId => $user->userId,
|
||||||
createdBy => $user->userId,
|
createdBy => $user->userId,
|
||||||
|
groupIdEdit => '2',
|
||||||
};
|
};
|
||||||
|
|
||||||
cmp_deeply( $event->get, superhashof( $properties ), 'Event properties saved correctly' );
|
cmp_deeply( $event->get, superhashof( $properties ), 'Event properties saved correctly' );
|
||||||
|
|
@ -164,6 +165,7 @@ $properties = {
|
||||||
%{ $properties },
|
%{ $properties },
|
||||||
ownerUserId => $user->userId,
|
ownerUserId => $user->userId,
|
||||||
createdBy => $user->userId,
|
createdBy => $user->userId,
|
||||||
|
groupIdEdit => '2',
|
||||||
};
|
};
|
||||||
|
|
||||||
cmp_deeply( $event->get, superhashof( $properties ), 'Events properties saved correctly' );
|
cmp_deeply( $event->get, superhashof( $properties ), 'Events properties saved correctly' );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue