Re: [rt-users] Not able to create external users with external auth

2017-01-12 Thread aniket tripathy
Thanks Claude.

We had the permissions configured to allow *everyone to raise ticket*.
Where we went wrong was in the attr_match_list, for configuring the
external-auth, we were giving the RealName as well. Commenting it out
worked.

Referred:
http://requesttracker.8502.n7.nabble.com/username-same-but-realname-and-email-is-different-for-existing-user-compare-to-ldap-attribute-causedd-td7105.html

-Aniket

On Wed, Jan 11, 2017 at 4:22 PM, Claude EDUMA <clauded...@gmail.com> wrote:

> Hi Aniket,
>
> You must configure "queue everyone privilege" to permit them to create
> ticket.
>
> Thank you.
>
> 2017-01-11 11:47 GMT+01:00 aniket tripathy <aniket.tripa...@gmail.com>:
>
>> hello,
>>
>> We are using RT 4.4 and using the external authentication mechanism from
>> a remote DB to authenticate the user. To enable others to create ticket we
>> have enabled *AutoCreateNonExternalUsers*. But any mails from outside
>> gets the response.
>>
>> *"You do not have permission to communicate with RT".*
>>
>>  Set( $UserAutocreateDefaultsOnLogin, { Privileged => 1 } );
>>  Set($AutoCreateNonExternalUsers, 1);
>>  Set( $ExternalAuthPriority, ["My_SSO_Cookie"] );
>>  Set( $ExternalInfoPriority, ["My_MySQL"] );
>>  Set($AutoCreateNonExternalUsers, 1);
>>
>> At the queue level, I have given everyone the right to  create and reply
>> to tickets.
>>
>> The logs are like:
>>
>> [11230] [Wed Jan 11 16:07:08 2017] [info]: 
>> RT::Authen::ExternalAuth::DBI::CanonicalizeUserInfo
>> INFO CHECK FAILED Key: rtUserName Value:  No User Found in
>> External Database! (/opt/rt4/sbin/../lib/RT/Authe
>> n/ExternalAuth/DBI.pm:400)
>> [11230] [Wed Jan 11 16:07:08 2017] [info]: 
>> RT::Authen::ExternalAuth::DBI::CanonicalizeUserInfo
>> INFO CHECK FAILED Key: emailId Value:  No User Found in External
>> Database! (/opt/rt4/sbin/../lib/RT/Authen/ExternalAuth/DBI.pm:400)
>> [11230] [Wed Jan 11 16:07:08 2017] [info]: 
>> RT::User::CanonicalizeUserInfoFromExternalAuth
>> returning Comments: Autocreated on ticket submission, Disabled: ,
>> EmailAddress: , Name: , Privileged: , RealName:
>>  (/opt/rt4/sbin/../lib/RT/User.pm:812)
>> [11230] [Wed Jan 11 16:07:08 2017] [warning]: Use of uninitialized value
>> $email in concatenation (.) or string at /opt/rt4/sbin/../lib/RT/User.pm
>> line 680. (/opt/rt4/sbin/../lib/RT/User.pm:680)
>> [11230] [Wed Jan 11 16:07:08 2017] [warning]: Use of uninitialized value
>> $args{"Name"} in concatenation (.) or string at
>> /opt/rt4/sbin/../lib/RT/User.pm line 143. (/opt/rt4/sbin/../lib/RT/User.
>> pm:143)
>> [11230] [Wed Jan 11 16:07:08 2017] [warning]: Use of uninitialized value
>> $args{"EmailAddress"} in concatenation (.) or string at
>> /opt/rt4/sbin/../lib/RT/User.pm line 143. (/opt/rt4/sbin/../lib/RT/User.
>> pm:143)
>> [11230] [Wed Jan 11 16:07:13 2017] [critical]: Failed to create user
>> : Must specify 'Name' attribute (/opt/rt4/sbin/../lib/RT/User.
>> pm:546)
>> [11230] [Wed Jan 11 16:07:13 2017] [crit]: Permission Denied: You do not
>> have permission to communicate with RT (/opt/rt4/sbin/../lib/RT/Inter
>> face/Email.pm:697)
>>
>>
>> Am I missing any configuration at my end?
>>
>> Thanks.
>>
>
>


[rt-users] Not able to create external users with external auth

2017-01-11 Thread aniket tripathy
hello,

We are using RT 4.4 and using the external authentication mechanism from a
remote DB to authenticate the user. To enable others to create ticket we
have enabled *AutoCreateNonExternalUsers*. But any mails from outside gets
the response.

*"You do not have permission to communicate with RT".*

 Set( $UserAutocreateDefaultsOnLogin, { Privileged => 1 } );
 Set($AutoCreateNonExternalUsers, 1);
 Set( $ExternalAuthPriority, ["My_SSO_Cookie"] );
 Set( $ExternalInfoPriority, ["My_MySQL"] );
 Set($AutoCreateNonExternalUsers, 1);

At the queue level, I have given everyone the right to  create and reply to
tickets.

The logs are like:

[11230] [Wed Jan 11 16:07:08 2017] [info]:
RT::Authen::ExternalAuth::DBI::CanonicalizeUserInfo INFO CHECK FAILED Key:
rtUserName Value:  No User Found in External Database!
(/opt/rt4/sbin/../lib/RT/Authen/ExternalAuth/DBI.pm:400)
[11230] [Wed Jan 11 16:07:08 2017] [info]:
RT::Authen::ExternalAuth::DBI::CanonicalizeUserInfo INFO CHECK FAILED Key:
emailId Value:  No User Found in External Database!
(/opt/rt4/sbin/../lib/RT/Authen/ExternalAuth/DBI.pm:400)
[11230] [Wed Jan 11 16:07:08 2017] [info]:
RT::User::CanonicalizeUserInfoFromExternalAuth returning Comments:
Autocreated on ticket submission, Disabled: , EmailAddress: , Name: ,
Privileged: , RealName:  (/opt/rt4/sbin/../lib/RT/User.pm:812)
[11230] [Wed Jan 11 16:07:08 2017] [warning]: Use of uninitialized value
$email in concatenation (.) or string at /opt/rt4/sbin/../lib/RT/User.pm
line 680. (/opt/rt4/sbin/../lib/RT/User.pm:680)
[11230] [Wed Jan 11 16:07:08 2017] [warning]: Use of uninitialized value
$args{"Name"} in concatenation (.) or string at
/opt/rt4/sbin/../lib/RT/User.pm line 143.
(/opt/rt4/sbin/../lib/RT/User.pm:143)
[11230] [Wed Jan 11 16:07:08 2017] [warning]: Use of uninitialized value
$args{"EmailAddress"} in concatenation (.) or string at
/opt/rt4/sbin/../lib/RT/User.pm line 143.
(/opt/rt4/sbin/../lib/RT/User.pm:143)
[11230] [Wed Jan 11 16:07:13 2017] [critical]: Failed to create user
: Must specify 'Name' attribute
(/opt/rt4/sbin/../lib/RT/User.pm:546)
[11230] [Wed Jan 11 16:07:13 2017] [crit]: Permission Denied: You do not
have permission to communicate with RT
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:697)


Am I missing any configuration at my end?

Thanks.


Re: [rt-users] Query history ( oracle database )

2016-10-17 Thread aniket tripathy
In Transactions  table, the condition ObjectType= RT::Ticket and objectId =
 will give you the transactions for the ticket. The contents of
those transactions will be available from Attachments table.

On Mon, Oct 17, 2016 at 1:32 PM, Pletter Thomas 
wrote:

> Hello,
>
> Our repository is stored in a oracle database.
>
> In which column is the history of a ticket stored ?
>
> I find * >* ,
>
> Is it the Table transactions, Column data ? In Column objectid is the
> ticket id stored .
> When I query the table transactions, I can’t get the total history of one
> ticket.
>
> Kind regards,
> Tom
> __
>
> HINWEIS:
> Alle von Gesellschaften der REWE International AG elektronisch
> uebermittelten Auskuenfte, Mitteilungen
> und Erklaerungen sind vertraulich und rechtlich unverbindlich.
> Verpflichtungen von Gesellschaften der
> REWE International AG beduerfen der schriftlichen Einigung in saemtlichen
> Vertragspunkten sowie der Unterfertigung
> durch das vertretungsbefugte Organ. Im Falle einer Fehluebermittlung
> ersuchen wir um Benachrichtigung sowie um
> Vernichtung und Beachtung, dass jegliche Form der Verwendung und
> Weitergabe der Inhalte an Dritte unzulaessig ist.
>
> NOTICE:
> All notices, declarations and explanations transferred electronically from
> REWE International AG companies
> are confidential and not legally binding. Obligations of  REWE
> International AG companies arise only when written
> agreement to all contractual points has been confirmed in writing with the
> signature of an authorized representative.
> If this e-mail was sent by mistake, please inform  us immediately.
> Furthermore we also request you to destroy it
> and use neither the contents nor disclose them in any manner to third
> parties.
>
>
> -
> RT 4.4 and RTIR training sessions, and a new workshop day!
> https://bestpractical.com/training
> * Boston - October 24-26
> * Los Angeles - Q1 2017
>
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

[rt-users] AuthToken Field in the User table

2016-10-13 Thread aniket tripathy
Hello,

Has anybody ever come across any extension/examples, other than in the
ical-extension, for the use of  Auth token? Or any idea which scenarios it
can be used?

Thanks,
Aniket
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

[rt-users] Managing custom roles at ticket and queue level

2016-07-06 Thread aniket tripathy
Hi All,


In our organizations, we are using RT 4.4 to host around 20 queues.
1. We have created a staff group for each of the queues, who will be
responsible for looking into the tickets.

Since this group has the same permissions across all queues, I am wondering
if we can create a STAFF custom-role(*multi value*) and apply it to all
queues and assign the permissions globally for this new Role. If yes,
further I would like to automate applying this role whenever a queue is
newly created.

One more doubt, how can we make this role unavailable at the ticket level

2. Is there any way I can make a multi-value custom role visible at the
ticket level but not at the queue level. (the way "Owner" role works, it is
single valued role though)?

Thanks in Advance!!!

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


Re: [rt-users] Getting CurrentUser reference in Users overlay file

2016-06-24 Thread aniket tripathy
My bad, in the above script, the $self was holding the 1st argument, rather
than the reference of RT::Users class.

The original subroutine returns the ref of RT::Users.
As per the documentation of Hook::Lexwrap, the returned value from the
original subroutine should be accessible from the post subroutine using
$_[-1].

When I access $_[-1], using print or warn, I get the warning
* [warning]: Use of uninitialized value $_[-1] in concatenation (.) or
string*

Users_Local.pm
---
package RT::Users;
use strict;
use Hook::LexWrap;
wrap 'SimpleSearch' =>
post=> sub {
RT::Logger->info("accessing return value here $_[-1]");
RT::Logger->info("I got the arguments in post: [@_]");
},
;
1;

Can anybody please help how will I be able to fetch the value returned by
the original subroutine ?
Thanks.



On Tue, Jun 21, 2016 at 1:05 PM, aniket tripathy <aniket.tripa...@gmail.com>
wrote:

> Hi,
>
> I intend to filter the results returned by SimpleSearch method in Users.pm
> based on the custom field value set in the current user logged in.
>
> I am using Hook::LexWrap in the Users_Local.pm overlay file, to write a
> post method to filter the results of SimpleSearch. How can I get a ref of
> CurrentUser which in turn will help to fetch the custom field value on that
> user?
>
> I tried using
> my $user = $self->CurrentUser;
>
> But getting the following error:
> [error]: Can't locate object method "CurrentUser" via package "Privileged"
> (perhaps you forgot to load "Privileged"?)
>
> Can anybody suggest what am I doing wrong here?
>
> Thanks in Advance.
>
> -Aniket
>
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Getting CurrentUser reference in Users overlay file

2016-06-21 Thread aniket tripathy
Hi,

I intend to filter the results returned by SimpleSearch method in Users.pm
based on the custom field value set in the current user logged in.

I am using Hook::LexWrap in the Users_Local.pm overlay file, to write a
post method to filter the results of SimpleSearch. How can I get a ref of
CurrentUser which in turn will help to fetch the custom field value on that
user?

I tried using
my $user = $self->CurrentUser;

But getting the following error:
[error]: Can't locate object method "CurrentUser" via package "Privileged"
(perhaps you forgot to load "Privileged"?)

Can anybody suggest what am I doing wrong here?

Thanks in Advance.

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


Re: [rt-users] Getting Unknown encoding 'UTF-8' error after installing Hook-LexWrap-0.25

2016-06-21 Thread aniket tripathy
Apologies foilks. The error was due to compilation issues in my
Users_Local.pm file.

On Thu, Jun 16, 2016 at 7:44 PM, aniket tripathy <aniket.tripa...@gmail.com>
wrote:

> Hi All,
>
> We are using RT 4.4.0 in our organization. As part of some custom
> development,  we installed Hook-LexWrap-0.25 using cpan.
>
> We are getting the following error on starting the rt-server after
> installing the Hook::LexWrap module
>
> "Unknown encoding 'UTF-8' at /opt/requestTracker/sbin/../lib/RT.pm line
> 270."
>
>
> Once we omit the Users_Local.pm file which uses the LexWrap module,
> rt-server starts up fine.
>
> We are perl newbies. Did we miss something during installation of module
> or is there any dependency issues between RT 4.4.0 and Hook-LexWrap-0.25?
>
> Thanks.
>
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Getting Unknown encoding 'UTF-8' error after installing Hook-LexWrap-0.25

2016-06-16 Thread aniket tripathy
Hi All,

We are using RT 4.4.0 in our organization. As part of some custom
development,  we installed Hook-LexWrap-0.25 using cpan.

We are getting the following error on starting the rt-server after
installing the Hook::LexWrap module

"Unknown encoding 'UTF-8' at /opt/requestTracker/sbin/../lib/RT.pm line
270."


Once we omit the Users_Local.pm file which uses the LexWrap module,
rt-server starts up fine.

We are perl newbies. Did we miss something during installation of module or
is there any dependency issues between RT 4.4.0 and Hook-LexWrap-0.25?

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


[rt-users] Multi tenancy Queue names

2016-06-11 Thread aniket tripathy
Hi,

Our organization is planning to have multiple tenants in the same RT
instance.

Say we are an organization X, our clients are businesses of similar types
X1, X2... Xn, who in turn have their customers.

We want to host X1, X2... X5 in one RT instance, with each client having
its own set of queues and we will be having several such RT instances
hosting multiple such clients.
We have to maintain queues(like Travel, Admin, HR etc) with the same names
for all the clients.
A single RT instance won't allow multiple queues with the same name.
So, we would be naming our queues as _HR,_Admin,
_Travel etc. But we don't want to display the tenantId in the
UI, we just want to display them as HR, Travel and Admin to the end-users.

Has anyone ever tried this approach or has suggestions how to go about it?

 Any other approaches to handle multi tenancy are most welcome.


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


[rt-users] Custom Role for Approval Mechanism

2016-06-11 Thread Aniket Tripathy
Hi Everybody,
Problem statement:

 In our organization, out of the 20 queues, few queues need the approval
mechanism. Approvals are required for specific tickets in the queue, based
on scenarios decided by the staff member of the queue. So approvers are not
added at the time of ticket creation. Example: the travel queue ticket needs
approval from the requestors' manager only when the travelling cost is high.
Approach

We are taking the following approach, would invite suggestions, enhancement
and problems(if any) with this approach1.We are adding a new CustomRole
called Approver(multiple values) to each of the queues. 2.The queue staff
adds the approver, if necessary, in the people's page after the ticket is
created3. A scrip to add ticket in the approval queue whenever an approver
is added.
Scenarios

We are handling 3 scenarios:
1. *Single approver*: Once the approver is added,in the user field, an
approval ticket is created and assigned to the approver.
2. *Multiple approvers(need approval from all of them)*. Similar to step 1.
add Multiple approvers and that many approval tickets are created, with each
approver being the owner of the ticket.
3. *Multiple approvers(approval from any one will do).* We have assumed, if
approval from any one will do , they should belong to a particular group,
and have equal say in matters. So we add them in the group field. In the
scrips the logic is, if the approver is a group, then all the members of the
group are added as the AdminCc of the single approval ticket created and any
one can approve and close that ticket.
Please suggest pros and cons of this approach.
Thanks!



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Custom-Role-for-Approval-Mechanism-tp62003.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Multi-Tenant Users

2016-05-27 Thread Aniket Tripathy
Matt Wells  mosaic451.com> writes:

> 
> 
> 
> Hi all, first let me say thanks for all the great data on this list.  
It's one of the most active I'm on.  Thank you all. 
> I have a question on a multi-tenant system I'm bringing up in dev.  In 
testing the isolation of queues and tickets was easy enough; however one 
item within the ticket became an issue.  
> 
> Bob  example.com can use the auto-fill on in the users field to 
gather data on other users outside of his group on the system.  
> I fished around in the global menu but failed to find a place to 
disable this.  Can anyone point me in the right direction?
> I'm on 4.2.9.
> 
> 
> 
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Washington DC - May 23 & 24, 2016
> 


Hi Matt,

I'm looking for implementing a multi tenant RT system, where we can host 
the queues of multiple customer.
1. Although I did not find any option to disable the auto-fill option, 
will limiting the search to the group of users for that particular 
tenant help?. 
A couple of doubts from my end.
1. There might be a scenario, where different tenants will be having 
same queue name or user name (both having unique constraint at the DB 
level). What approach would you suggest to handle that scenario?
2. Is adding an an additional column to hold the tenant id a good idea? 
Or handling through custom field at queue, User and group level will be 
a better approach.

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