added #9289: Extending the "Request Approval For Version Tag" activity (Bernd Kalbfuß-Zimmermann)

This commit is contained in:
Doug Bell 2009-04-30 18:02:25 +00:00
parent faca68256c
commit bc2ed6a3c1
3 changed files with 21 additions and 1 deletions

View file

@ -63,6 +63,12 @@ sub definition {
label => $i18n->get( 'committerGroupId label' ),
hoverHelp => $i18n->get( 'committerGroupId description' ),
},
invertGroupSetting => {
fieldType => "yesNo",
defaultValue => 0,
label => $i18n->get( 'invertGroupSetting label' ),
hoverHelp => $i18n->get( 'invertGroupSetting description' ),
},
},
};
return $class->SUPER::definition( $session, $definition );
@ -86,7 +92,8 @@ sub execute {
my $committedBy = WebGUI::User->new( $self->session, $tag->get( 'committedBy' ) );
# If tag is handled by this activity
if ( $committedBy->isInGroup( $self->get( 'committerGroupId' ) ) ) {
if ( (!$self->get( 'invertGroupSetting' ) && $committedBy->isInGroup( $self->get( 'committerGroupId' ) ) )
|| ($self->get( 'invertGroupSetting' ) && !$committedBy->isInGroup( $self->get( 'committerGroupId' ) ) ) ) {
return $self->SUPER::execute( $tag, $instance );
}
else {