Hi!
I’m trying to make a condition in some of the HTML pages. I only want my “Inhouse”-group to be able to set the owner of a ticket, furthermore there is an “Inhouse-admin” group that are a member of the “Inhouse” group, which need access to this too. The rest will only be able to change it to Nobody (like releasing a ticket)
From what I can gather, I should be able to do it like this:
my $groupobj = RT::Group->new();
$groupobj->LoadUserDefinedGroup(‘Inhouse’);
if(!$groupobj->HasMemberRecursively($session{CurrentUser}))
{
blablabla();
}
The problem is that the if-statement always returns true, meaning that the function returns false. I have tried both as a member of the sub-group (admin) and as a member of the specified “Inhouse” group.
Anybody got an idea why this fails?
Cheers
Bjørn Skovlund Rydén
Bj�rn Skovlund Ryd�n wrote:
my $groupobj = RT::Group->new();
$groupobj->LoadUserDefinedGroup(‘Inhouse’);
if(!$groupobj->HasMemberRecursively($session{CurrentUser}))
{
blablabla();
}
Try something like:
my $groupobj = new RT::Group($session{‘CurrentUser’});
$groupobj->LoadUserDefinedGroup(‘Inhouse’);
if(!$groupobj->HasMemberRecursively($session{‘CurrentUser’}->PrincipalObj))
{
blablabla();
}
(off the top of my head)
Hi again
let me start by saying that I did google for this, but either the
answer to my question is ‘No’ or I am too stupid to find it, which I
attribute to my splitting headache. Sorry if it’s obvious and I should
have found it myself. I did look.
Is there a SOAP, XML, JASON, whatever interface in the works for 3.8?
Alternatively, is there a module etc of some sort?
Thanks once again,
Richard
Hi again
let me start by saying that I did google for this, but either the
answer to my question is ‘No’ or I am too stupid to find it, which I
attribute to my splitting headache. Sorry if it’s obvious and I should
have found it myself. I did look.
RT::Client::REST and the RT cli both use RT’s REST API. It’s been there
since 3.0. (Though it doesn’t use any XML
-jesse
RT::Client::REST and the RT cli both use RT’s REST API. It’s been there
since 3.0. (Though it doesn’t use any XML
Yes, that is what we are using, at the moment. I just hoped there was
something new, but we will just continue to use REST. I assume there
were no incompatible changes between 3.4. and 3.8?
Thanks,
Richard