CustomerGroupAlwaysGroups x Backend

Moderator: crythias

Locked
mrcocco
Znuny newbie
Posts: 5
Joined: 04 Nov 2011, 10:34
Znuny Version: 3.0.11
Real Name: Giuliano Bacci

CustomerGroupAlwaysGroups x Backend

Post by mrcocco »

Hello all,
I've configured multiple ldap backend for my customers.
Now I have to assign each customer to its group so that can divide each customer in a dedicated queue.

Let me know if you can assign each user to a customer group based on the backend used for login.

Searching on Internet I found a person who says to use the filters acl, but I did not understand how :(

Thanky you all.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: CustomerGroupAlwaysGroups x Backend

Post by crythias »

Seems you're on the right path. If you're using multiple backends, you should be appending an index number to each entry, and CustomerGroupAlways group...
It appears you're there. Do you want to show your Config.pm?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
mrcocco
Znuny newbie
Posts: 5
Joined: 04 Nov 2011, 10:34
Znuny Version: 3.0.11
Real Name: Giuliano Bacci

Re: CustomerGroupAlwaysGroups x Backend

Post by mrcocco »

Here my section of Conifg.pm where I configure the customer login.
If you can explain me the sintax to enable different CustomerGroupAlwaysGroup for this two backend you would be grateful!

#Customer Users

$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host1'} = '10.50.24.1';
$Self->{'Customer::AuthModule::LDAP::BaseDN1'} = 'dc=flag, dc=local';
$Self->{'Customer::AuthModule::LDAP::UID1'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN1'} = 'cn=bindotrs,dc=flag,dc=local';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw1'} = 'bindotrs';

$Self->{'Customer::AuthModule2'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host2'} = '192.168.248.253';
$Self->{'Customer::AuthModule::LDAP::BaseDN2'} = 'dc=flag, dc=ext';
$Self->{'Customer::AuthModule::LDAP::UID2'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN2'} = 'cn=bindotrs,cn=Users,dc=flag,dc=ext';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw2'} = 'bindotrs';


$Self->{CustomerUser1} = {
Name => 'Customer Local DB',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => '10.50.24.1',
BaseDN => 'dc=flag, dc=local',
SSCOPE => 'sub',
UserDN => 'cn=bindotrs,dc=flag,dc=local',
UserPw => 'bindotrs',
AlwaysFilter => '',
SourceCharset => 'utf-8',
DestCharset => 'iso-8859-1',
},
CustomerKey => 'sAMAccountName',
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type
#[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};
$Self->{CustomerUser2} = {
Name => 'Customer Ext DB',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => '192.168.248.253',
BaseDN => 'dc=flag, dc=ext',
SSCOPE => 'sub',
UserDN => 'cn=bindotrs,cn=Users,dc=flag,dc=ext',
UserPw => 'bindotrs',
AlwaysFilter => '',
SourceCharset => 'utf-8',
DestCharset => 'iso-8859-1',
},
CustomerKey => 'sAMAccountName',
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type
#[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'objectCategory', 1, 0, 'var' ],
],
};
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: CustomerGroupAlwaysGroups x Backend

Post by crythias »

This was a mistake on my part. Users/Agents can be assigned groups from backends, but customers are handled differently/collectively in config.pm

This doesn't mean you can't assign manually. It just means it's not (as far as I can tell) chooseable from backend for customers.

But you might consider CustomerID as a factor in your ACLs.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
mrcocco
Znuny newbie
Posts: 5
Joined: 04 Nov 2011, 10:34
Znuny Version: 3.0.11
Real Name: Giuliano Bacci

Re: CustomerGroupAlwaysGroups x Backend

Post by mrcocco »

I tried to consider ACLs but without success.
I have inserted in Config.pm the following lines but nothing happens:

$Self->{TicketAcl}->{'ACL-Name-Test'} = {
Properties => {
Ticket => {
CustomerID => ['CN=Person,CN=Schema,CN=Configuration,DC=flag,DC=local'],
}
},

Possible => {
Ticket => {
Queue => ['internal'],
},
},
};

Where "internal" is the queue reserved for account of domain flag.local.
Where "CN=Person,CN=Schema,CN=Configuration,DC=flag,DC=local" is the value of the attribute of active directory "objectCategory", the only one attribute that I found that is always the same for all users of domain flag.local
and with [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ], modifed in [ 'UserCustomerID', 'CustomerID', 'objectCategory', 0, 1, 'var' ],

Please help me to configure an ACL properly to do so!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: CustomerGroupAlwaysGroups x Backend

Post by crythias »

The CustomerID is
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],

the email address of the user.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
mrcocco
Znuny newbie
Posts: 5
Joined: 04 Nov 2011, 10:34
Znuny Version: 3.0.11
Real Name: Giuliano Bacci

Re: CustomerGroupAlwaysGroups x Backend

Post by mrcocco »

Hi Crythias,
first of all I'm sorry for the elapsed time of my answer.
I see it now, but I did not understand it.
How can I apply an ACL to all users of domain flag.local so that the only available queue is internal?
On the other side I have to apply an ACL to all users of domain flag.ext so that the only available queue is external.

I hope you'll solve my problem!!
Giuliano Bacci.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: CustomerGroupAlwaysGroups x Backend

Post by crythias »

not tested, but you can try
CustomerID => ['[regexp]@flag.local',],

http://doc.otrs.org/3.0/en/html/acl.html
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
mrcocco
Znuny newbie
Posts: 5
Joined: 04 Nov 2011, 10:34
Znuny Version: 3.0.11
Real Name: Giuliano Bacci

Re: CustomerGroupAlwaysGroups x Backend

Post by mrcocco »

Nothing to do.
Perhaps it doesn't work without using regular expression. I have used a static email address like "CustomerID => ['g.bacci@flag.local',]," without success.
I still can see all queues of my system.
I think that OTRS is not loading ACL in Config.pm.
This is my acl statement in Config.pm

$Self->{TicketAcl}->{'ACL-Internal'} = {
Properties => {
Ticket => {
CustomerID => ['g.bacci@flag.local',],
#CustomerID => ['[regexp]@flag.local',],
}
},

Possible => {
Ticket => {
Queue => ['ATS'],
},
},
};

Thank you for your assistance and for all time spent on my problem,
Giuliano Bacci.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: CustomerGroupAlwaysGroups x Backend

Post by crythias »

The problem is that all the queues that the customer can see are likely to be available. The correct way to do this is to make customers members of the group the queue belongs to that they want to see.

Now, on the one hand, *I* (and I'm just a nobody) don't consider it to be practical to have queues relating to customers. Queues should be related to what *AGENTS* will handle what *KIND* of tickets.

Example: You go to a movie theater and you queue for tickets or popcorn. The agents selling popcorn or tickets don't *care* who's in the queue. But they'll report on who presents a CustomerID/credit card/login in their queue. The customers, however, would be well-placed to know that they're in line to buy tickets or to buy popcorn, so they choose the queue that applies to what they need. They already know who they are. They assume that you'll know it, too, once they provide identification. But they've already provided identification: They've logged in.

Back to your situation, if you're going to assign a customer to a queue based upon their CustomerID, perhaps you should take that out of the equation. It's possible to set something like this:

Code: Select all

<input type="hidden" name="Dest">
<script type="text/javascript">
var CustomerID = $QData{"CustomerID"};
var atloc = CustomerID.substring(0,CustomerID.lastIndexOf('@')+1;
var domain = CustomerID.substring(atloc.length,CustomerID.length+1);
var Dest = document.getElementsByName("Dest").item(0);
switch(domain)
{
case flag.local:
  Dest.value = "Intern";
  break;
default:
  Dest.value = "Main";
}
</script>
Or use Generic Agent to try and move it.
Or PossibleNot in ACL for all queues the customer shouldn't see.
Or use CustomerGroups and assign flag.local to a Group and get all the other queues off "users" because everybody are "users", and assign membership that way.

See the problems to resolve this?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked