fixing Calendar/Event add/edit privileges

This commit is contained in:
Colin Kuskie 2007-02-26 23:13:36 +00:00
parent 21573a54f1
commit 1b1804fc16
2 changed files with 22 additions and 1 deletions

View file

@ -6,6 +6,8 @@
- fix: Off by 1 error while displaying ad impressions (perlDreamer Consulting, LLC)
- fix: Wrong link in template toolkit help (perlDreamer Consulting, LLC)
- fix: Outdated info in Env macro help (perlDreamer Consulting, LLC)
- fix: Calendar: Only Turn Admin On group can add events (perlDreamer Consulting, LLC)
- fix: Event -> canEdit (perlDreamer Consulting, LLC)
- fix: A bunch of bugs in fileImport.pl and improved its performance very
significantly (Martin Kamerbeek / Oqapi)

View file

@ -131,6 +131,24 @@ sub definition {
#-------------------------------------------------------------------
=head2 canAdd ( session )
Class method to verify that the user has the privileges necessary to add this type of asset. Return a boolean.
=head3 session
The session variable.
=cut
sub canAdd {
my $class = shift;
my $session = shift;
$class->SUPER::canAdd($session, undef, '7');
}
####################################################################
@ -144,7 +162,8 @@ sub canEdit {
my $self = shift;
my $session = $self->session;
return $session->user->isInGroup($self->getParent->get("groupIdEventEdit"));
return $session->user->isInGroup($self->getParent->get("groupIdEventEdit"))
or $self->SUPER::canEdit;
}