Re: [rt-users] Permission causes wrong search-results

2016-06-30 Thread Eierschmalz, Bernhard
Hi,

thanks for your support
NOT LIKE-operator also doesn't work correctly.

I know very well about permissions and search function. I also tried to create 
the search with the assistant - same issue (because the assistant creates the 
same query).

I cannot believe this is a normal issue - because
- if I run the same search with a different user, it works. This is the reason 
why I think the search query is correct
- if I run the same search with = instead of != (or NOT LIKE) operator, it 
works (of course with a different result). This is the reason why I think the 
permissions on the custom field is correct.



best regards
Bernhard



-Ursprüngliche Nachricht-
Von: Bryon Baker [mailto:bba...@copesan.com] 
Gesendet: Donnerstag, 30. Juni 2016 17:20
An: Eierschmalz, Bernhard; martin.whel...@greenhills-it.co.uk
Cc: rt-users@lists.bestpractical.com
Betreff: RE: [rt-users] Permission causes wrong search-results

Hey There I think you need to use 

"NOT LIKE"

IE
Queue = 'General' AND Owner = 'Nobody' AND ('CF.{category}' exists AND 
'CF.{category}' NOT LIKE 'one')

Thanks
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726 Ext. 2296 • 262-783-6261 Ext. 2296 bba...@copesan.com 
www.copesan.com "Servicing North America with Local Care"

-Original Message-
From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Eierschmalz, Bernhard
Sent: Thursday, June 30, 2016 10:03 AM
To: martin.whel...@greenhills-it.co.uk
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Permission causes wrong search-results

Hi,

I'm sorry but this doesn't work - Request tracker sais "wrong query" if I try 
to run the search with "'CF.{category}' exists"

Message is: Wrong query, expecting a OPERATOR in  AND 'CF.{category}' 
>exists<--here'




-Ursprüngliche Nachricht-
Von: Martin Wheldon [mailto:martin.whel...@greenhills-it.co.uk]
Gesendet: Donnerstag, 30. Juni 2016 16:12
An: Eierschmalz, Bernhard
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Permission causes wrong search-results

Hi,

IMO this is working correctly for the following reason, as far as the user is 
concerned the the custom field does not contain the specified value.

For this situation you would need somthing like:

Queue = 'General' AND Owner = 'Nobody' AND ('CF.{category}' exists AND 
'CF.{category}' != 'one')

Best Regards

Martin

On 2016-06-30 10:39, Eierschmalz, Bernhard wrote:
> Hello,
> 
> I'm using RT 4.4.0
> 
> I found the following problem:
> 
> I have a custom field "category" with settings "select one value".
> There are 5 possible values.
> 
> I build a search for all tickets like the following
> 
> Queue = 'General' AND Owner = 'Nobody' AND 'CF.{category}' != 'one'
> 
> I found that the search results ignore the part CF.{category} != 'one'
> and shows all tickets, no matter which category.
> 
> I tested with CF.{category} = 'one' and this works - it shows all the 
> ticket with category 'one'
> 
> I used the same search with root-user, and it always works as expected
> - so I thought this would be a problem with permissions.
> 
> My default-user has the following permissions on this queue:
> 
> "general rights" à all
> 
> "Rights for Staff" à all but "delete tickets" and "forward messages 
> outside of RT"
> 
> "rights for Administrators" à no permissions
> 
> My next try was changing the permissions of the custom field.
> 
> I found out that, as soon as the user has the permission "General 
> rights" à "view custom fields" on the "category"-Custom field, the 
> search is working as expected.
> 
> So in short:
> 
> Search on the CF with = operator works always,
> 
> Search on the CF with != operator works only, if the user has "view 
> custom fields" permission on the custom field.
> 
> So I have a possible solution now, but I would like to understand how 
> this error occurs. Is this a bug or a feature?
> 
> Best regards
> 
> Bernhard
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Los Angeles - September, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Custom fields in transaction

2016-06-30 Thread Nilesh
Hi,

I'm trying to assign the ticket to a queue based on a transaction
custom field, but I am unable to fetch the custom field in my scrip.

Scrip details:
Condition: On correspond
Action: User defined
Template: Blank

Custom condition:
1;

Custom action preparation code:
1;

Custom action commit code:
my $queueName = $self->TicketObj->QueueObj->Name;
RT::Logger->info("Queue name: $queueName");

my $trans = $self->TransactionObj;
RT::Logger->info($trans->FirstCustomFieldValue("Product"));

--

The method FirstCustomFieldValue returns empty even though the value is
set in form submission.

All the stuff I found on Google are about custom fields in tickets,
seems nobody uses transaction custom fields?

I'm using RT 4.4.0.

-- 
Nilesh

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Permission causes wrong search-results

2016-06-30 Thread Eierschmalz, Bernhard
Hi,

I'm sorry but this doesn't work - Request tracker sais "wrong query" if I try 
to run the search with "'CF.{category}' exists"

Message is: Wrong query, expecting a OPERATOR in  AND 'CF.{category}' 
>exists<--here'




-Ursprüngliche Nachricht-
Von: Martin Wheldon [mailto:martin.whel...@greenhills-it.co.uk] 
Gesendet: Donnerstag, 30. Juni 2016 16:12
An: Eierschmalz, Bernhard
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Permission causes wrong search-results

Hi,

IMO this is working correctly for the following reason, as far as the user is 
concerned the the custom field does not contain the specified value.

For this situation you would need somthing like:

Queue = 'General' AND Owner = 'Nobody' AND ('CF.{category}' exists AND 
'CF.{category}' != 'one')

Best Regards

Martin

On 2016-06-30 10:39, Eierschmalz, Bernhard wrote:
> Hello,
> 
> I'm using RT 4.4.0
> 
> I found the following problem:
> 
> I have a custom field "category" with settings "select one value".
> There are 5 possible values.
> 
> I build a search for all tickets like the following
> 
> Queue = 'General' AND Owner = 'Nobody' AND 'CF.{category}' != 'one'
> 
> I found that the search results ignore the part CF.{category} != 'one'
> and shows all tickets, no matter which category.
> 
> I tested with CF.{category} = 'one' and this works - it shows all the 
> ticket with category 'one'
> 
> I used the same search with root-user, and it always works as expected
> - so I thought this would be a problem with permissions.
> 
> My default-user has the following permissions on this queue:
> 
> "general rights" à all
> 
> "Rights for Staff" à all but "delete tickets" and "forward messages 
> outside of RT"
> 
> "rights for Administrators" à no permissions
> 
> My next try was changing the permissions of the custom field.
> 
> I found out that, as soon as the user has the permission "General 
> rights" à "view custom fields" on the "category"-Custom field, the 
> search is working as expected.
> 
> So in short:
> 
> Search on the CF with = operator works always,
> 
> Search on the CF with != operator works only, if the user has "view 
> custom fields" permission on the custom field.
> 
> So I have a possible solution now, but I would like to understand how 
> this error occurs. Is this a bug or a feature?
> 
> Best regards
> 
> Bernhard
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Los Angeles - September, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Issues with RTExternalAuth

2016-06-30 Thread Albert Shih
Hi every one.

I try to run a RT 4.4.0.

The

  RT::Authen::ExternalAuth

don't seem to work correctly.

I already check on this mailing list, and try the patch I seem. Nothing
seem to work correctly.

Here my RT_SiteConfig.pm

  Set($WebExternalAuth, 1 );
  Set($ExternalAuthPriority,  ['PLM']);
  Set($ExternalInfoPriority,  ['PLM']);
  Set($ExternalServiceUsesSSLorTLS,'0');
  Set($AutoCreateNonExternalUsers, '1');
  Set($ExternalSettings, { 'PLM' => {   'type' => 'ldap',
'server' => '*',
'user' => 'uid=nss,o=*',
'pass' => '*',
'base' => '*',
'filter' => '(objectClass=person)',
'd_filter' => '',
'tls' => '0',
'ssl_version' => '3',
'net_ldap_args' =>   [ 'version => 3', ],
'attr_match_list' =>   [ 'Name',  'EmailAddress', ],
'attr_map' =>{  'Name' => 'mail',  'EmailAddress' => 'mail',  
'Organization' => 'ou',  'RealName' => 'displayName',  'WorkPhone' => 
'telephoneNumber',  'City' => 'l', },
  }});

in that case I can authenticate in local without problem. But not against
my LDAP server.

If I add a

Set($ExternalAuth, 1 );

I can't authenticate at all (either local or LDAP) and I get something like :


Jun 30 14:22:37 rt RT: [5913] Expected 'PeerHost' at 
/usr/local/lib/perl5/site_perl/Net/LDAP.pm line 164.  Stack:   
[/usr/local/lib/perl5/site_perl/Carp.pm:167]   
[/usr/local/lib/perl5/site_perl/IO/Socket/IP.pm:485]   
[/usr/local/lib/perl5/site_perl/IO/Socket/IP.pm:386]   
[/usr/local/lib/perl5/5.20/mach/IO/Socket.pm:49]   
[/usr/local/lib/perl5/site_perl/IO/Socket/IP.pm:353]   
[/usr/local/lib/perl5/site_perl/Net/LDAP.pm:164]   
[/usr/local/lib/perl5/site_perl/Net/LDAP.pm:122]   
[/usr/local/lib/perl5/site_perl/RT/Authen/ExternalAuth/LDAP.pm:646]   
[/usr/local/lib/perl5/site_perl/RT/Authen/ExternalAuth/LDAP.pm:510]   
[/usr/local/lib/perl5/site_perl/RT/Authen/ExternalAuth.pm:581]   
[/usr/local/lib/perl5/site_perl/RT/Authen/ExternalAuth.pm:328]   
[/usr/local/share/rt44/html/Elements/DoAuth:57]   
[/usr/local/lib/perl5/site_perl/RT/Interface/Web.pm:308]   
[/usr/local/share/rt44/html/autohandler:53]

I running a RT 4.4.0 under FreeBSD.

Any idea ?

Regards

JAS
--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
jeu 30 jui 2016 14:24:34 CEST
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Permission causes wrong search-results

2016-06-30 Thread Eierschmalz, Bernhard
Hello,

I'm using RT 4.4.0

I found the following problem:
I have a custom field "category" with settings "select one value". There are 5 
possible values.

I build a search for all tickets like the following
Queue = 'General' AND Owner = 'Nobody' AND 'CF.{category}' != 'one'

I found that the search results ignore the part CF.{category} != 'one' and 
shows all tickets, no matter which category.
I tested with CF.{category} = 'one' and this works - it shows all the ticket 
with category 'one'

I used the same search with root-user, and it always works as expected - so I 
thought this would be a problem with permissions.
My default-user has the following permissions on this queue:
"general rights" --> all
"Rights for Staff" --> all but "delete tickets" and "forward messages outside 
of RT"
"rights for Administrators" --> no permissions

My next try was changing the permissions of the custom field.
I found out that, as soon as the user has the permission "General rights" --> 
"view custom fields" on the "category"-Custom field, the search is working as 
expected.


So in short:
Search on the CF with = operator works always,
Search on the CF with != operator works only, if the user has "view custom 
fields" permission on the custom field.


So I have a possible solution now, but I would like to understand how this 
error occurs. Is this a bug or a feature?

Best regards
Bernhard
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016