X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Flib%2FRT%2FGroup.pm;h=dc52957588f4086f18ce183ef2a364dce19c9817;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hp=779c026485daf301290aa3bf89c25173e4fe60a1;hpb=43a06151e47d2c59b833cbd8c26d97865ee850b6;p=freeside.git diff --git a/rt/lib/RT/Group.pm b/rt/lib/RT/Group.pm index 779c02648..dc5295758 100755 --- a/rt/lib/RT/Group.pm +++ b/rt/lib/RT/Group.pm @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -51,7 +51,7 @@ =head1 NAME - RT::Group - RT\'s group object + RT::Group - RT's group object =head1 SYNOPSIS @@ -529,8 +529,9 @@ sub _ValidateUserDefinedName { my $dupcheck = RT::Group->new(RT->SystemUser); $dupcheck->LoadUserDefinedGroup($value); - return (0, $self->loc("Group name '[_1]' is already in use", $value)) - if $dupcheck->id; + if ( $dupcheck->id && ( !$self->id || $self->id != $dupcheck->id ) ) { + return ( 0, $self->loc( "Group name '[_1]' is already in use", $value ) ); + } return 1; } @@ -1171,8 +1172,18 @@ sub CurrentUserHasRight { } +=head2 CurrentUserCanSee + +Always returns 1; unfortunately, for historical reasons, users have +always been able to examine groups they have indirect access to, even if +they do not have SeeGroup explicitly. +=cut +sub CurrentUserCanSee { + my $self = shift; + return 1; +} =head2 PrincipalObj