All,
I’m having trouble with the below…
get actor ID
my $Actor = $self->TransactionObj->Creator;
if actor is RT_SystemUser or root then get out of here
return 1 if $Actor == $RT::SystemUser->id;
return 1 if $Actor == root;
return 1;
I’ve tried == root and == 12 (the User’s ID). Am I doing something
wrong?
Thanks,
Daniel Jimenez
MemberSource Credit Union
Information Systems Analyst
713-244-1122 voice
713-572-8940 fax
djimenez@membersourcecu.org mailto:djimenez@membersourcecu.org
All,
I’m having trouble with the below…
get actor ID
my $Actor = $self->TransactionObj->Creator;
if actor is RT_SystemUser or root then get out of here
return 1 if $Actor == $RT::SystemUser->id;
return 1 if $Actor == root;
return 1;
I’ve tried == root and == 12 (the User’s ID). Am I doing something
wrong?
Daniel,
If you don’t want the action performed you should return 0,
not 1.
-Todd
Not in my situation because currently it returns 1 if it’s the system
user and doesn’t perform the action.-----Original Message-----
From: Todd Chapman [mailto:todd@chaka.net]
Sent: Thursday, March 09, 2006 9:39 PM
To: Daniel Jimenez
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Custom Action not performed if root
On Thu, Mar 09, 2006 at 06:37:45PM -0600, Daniel Jimenez wrote:
All,
I’m having trouble with the below…
get actor ID
my $Actor = $self->TransactionObj->Creator;
if actor is RT_SystemUser or root then get out of here
return 1 if $Actor == $RT::SystemUser->id;
return 1 if $Actor == root;
return 1;
I’ve tried == root and == 12 (the User’s ID). Am I doing something
wrong?
Daniel,
If you don’t want the action performed you should return 0,
not 1.
-Todd
Not in my situation because currently it returns 1 if it’s the system
user and doesn’t perform the action.
I’m confused. Your code below returns 1 no matter
what happens. It doesn’t make any sense!
If that’s the case, what am I doing wrong? I’d like for the custom
action to not be performed if userid = XX or if it’s RT_System.From: Todd Chapman [mailto:todd@chaka.net]
Sent: Friday, March 10, 2006 9:25 AM
To: Daniel Jimenez
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Custom Action not performed if root
Not in my situation because currently it returns 1 if it’s the system
user and doesn’t perform the action.
I’m confused. Your code below returns 1 no matter
what happens. It doesn’t make any sense!
-----Original Message-----
From: Todd Chapman [mailto:todd@chaka.net]
Sent: Thursday, March 09, 2006 9:39 PM
To: Daniel Jimenez
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Custom Action not performed if root
All,
I’m having trouble with the below…
get actor ID
my $Actor = $self->TransactionObj->Creator;
if actor is RT_SystemUser or root then get out of here
return 1 if $Actor == $RT::SystemUser->id;
return 1 if $Actor == root;
return 1;
I’ve tried == root and == 12 (the User’s ID). Am I doing something
wrong?
Daniel,
If you don’t want the action performed you should return 0,
not 1.
-Todd
my $ActorObj = $self->TransactionObj->CreatorObj;
if actor is RT_SystemUser or root then return false
return 0 if $ActorObj->id == $RT::SystemUser->id;
return 0 if $ActorObj->Name eq ‘root’;
return 1;On 3/13/06, Daniel Jimenez djimenez@membersourcecu.org wrote:
If that’s the case, what am I doing wrong? I’d like for the custom
action to not be performed if userid = XX or if it’s RT_System.
-----Original Message-----
From: Todd Chapman [mailto:todd@chaka.net]
Sent: Friday, March 10, 2006 9:25 AM
To: Daniel Jimenez
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Custom Action not performed if root
On Fri, Mar 10, 2006 at 09:06:10AM -0600, Daniel Jimenez wrote:
Not in my situation because currently it returns 1 if it’s the system
user and doesn’t perform the action.
I’m confused. Your code below returns 1 no matter
what happens. It doesn’t make any sense!
-----Original Message-----
From: Todd Chapman [mailto:todd@chaka.net]
Sent: Thursday, March 09, 2006 9:39 PM
To: Daniel Jimenez
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Custom Action not performed if root
On Thu, Mar 09, 2006 at 06:37:45PM -0600, Daniel Jimenez wrote:
All,
I’m having trouble with the below…
get actor ID
my $Actor = $self->TransactionObj->Creator;
if actor is RT_SystemUser or root then get out of here
return 1 if $Actor == $RT::SystemUser->id;
return 1 if $Actor == root;
return 1;
I’ve tried == root and == 12 (the User’s ID). Am I doing something
wrong?
Daniel,
If you don’t want the action performed you should return 0,
not 1.
-Todd
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
We’re hiring! Come hack Perl for Best Practical: Careers — Best Practical Solutions
Best regards, Ruslan.