[Rt-commit] r10569 - rt/branches/3.999-DANGEROUS/lib/RT/Model
ruz at bestpractical.com
ruz at bestpractical.com
Tue Jan 29 18:56:54 EST 2008
Author: ruz
Date: Tue Jan 29 18:56:54 2008
New Revision: 10569
Modified:
rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/ACECollection.pm
Log:
* fix missed lowerings of Delegated{From|By}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm Tue Jan 29 18:56:54 2008
@@ -197,8 +197,8 @@
principal_id => The id of an RT::Model::Principal object
principal_type => "User" "Group" or any Role type
right_name => the name of a right. in any case
- DelegatedBy => The Principal->id of the user delegating the right
- DelegatedFrom => The id of the ACE which this new ACE is delegated from
+ delegated_by => The Principal->id of the user delegating the right
+ delegated_from => The id of the ACE which this new ACE is delegated from
Either:
@@ -321,8 +321,8 @@
right_name => $args{'right_name'},
object_type => $args{'object_type'},
object_id => $args{'object_id'},
- DelegatedBy => 0,
- DelegatedFrom => 0
+ delegated_by => 0,
+ delegated_from => 0,
);
if ( $self->id ) {
return ( 0, _('That principal already has that right') );
@@ -334,8 +334,8 @@
right_name => $args{'right_name'},
object_type => ref( $args{'Object'} ),
object_id => $args{'Object'}->id,
- DelegatedBy => 0,
- DelegatedFrom => 0
+ delegated_by => 0,
+ delegated_from => 0,
);
#Clear the key cache. TODO someday we may want to just clear a little bit of the keycache space.
@@ -432,8 +432,8 @@
right_name => $self->__value('right_name'),
object_type => $self->__value('object_type'),
object_id => $self->__value('object_id'),
- DelegatedBy => $self->current_user->id,
- DelegatedFrom => $self->id
+ delegated_by => $self->current_user->id,
+ delegated_from => $self->id
);
if ( $delegated_ace->id ) {
return ( 0, _('That principal already has that right') );
@@ -444,8 +444,8 @@
right_name => $self->__value('right_name'),
object_type => $self->__value('object_type'),
object_id => $self->__value('object_id'),
- DelegatedBy => $self->current_user->id,
- DelegatedFrom => $self->id
+ delegated_by => $self->current_user->id,
+ delegated_from => $self->id
);
#Clear the key cache. TODO someday we may want to just clear a little bit of the keycache space.
@@ -487,9 +487,9 @@
Right => 'ModifyACL',
Object => $self->object
)
- && $self->__value('DelegatedBy') == 0
+ && $self->__value('delegated_by') == 0
)
- || ( $self->__value('DelegatedBy') == $self->current_user->id )
+ || ( $self->__value('delegated_by') == $self->current_user->id )
)
{
return ( 0, _('Permission Denied') );
@@ -692,7 +692,7 @@
sub _value {
my $self = shift;
- if ( $self->__value('DelegatedBy') eq $self->current_user->id ) {
+ if ( $self->__value('delegated_by') eq $self->current_user->id ) {
return ( $self->__value(@_) );
} elsif (
$self->principal_object->is_group
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ACECollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ACECollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ACECollection.pm Tue Jan 29 18:56:54 2008
@@ -236,9 +236,9 @@
# }}}
-# {{{ DelegatedBy
+# {{{ delegated_by
-=head2 DelegatedBy { id => undef }
+=head2 delegated_by { id => undef }
Limit the ACL to rights delegated by the principal whose Principal id is
B<Id>
@@ -254,7 +254,7 @@
@_
);
$self->limit(
- column => 'DelegatedBy',
+ column => 'delegated_by',
operator => '=',
value => $args{'id'},
entry_aggregator => 'OR'
@@ -264,9 +264,9 @@
# }}}
-# {{{ DelegatedFrom
+# {{{ delegated_from
-=head2 DelegatedFrom { id => undef }
+=head2 delegated_from { id => undef }
Limit the ACL to rights delegate from the ACE which has the id specified
by the id parameter.
@@ -282,7 +282,7 @@
@_
);
$self->limit(
- column => 'DelegatedFrom',
+ column => 'delegated_from',
operator => '=',
value => $args{'id'},
entry_aggregator => 'OR'
More information about the Rt-commit
mailing list