[rt-users] RT::Client::REST

2010-07-13 Thread Michelle Sullivan
Got it working a treat, but I need to be able to disable accounts and
re-enable them, is this possible with RT::Client::REST?

If not, how would one do it?

Thanks,

Michelle

Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


[rt-users] RT::Client::REST

2006-12-07 Thread Roy El-Hames

Hi Folks;

RT-3.6.1
apache2/mod_perl2

I am looking for pointers to use RT::Client::REST in particular how to 
populate/update custom fields,any one used this for 3.6.1  (Dmitri ??);

Thanks;
Roy

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT::Client::REST

2010-07-13 Thread Alberto Villanueva



Got it working a treat, but I need to be able to disable accounts and
re-enable them, is this possible with RT::Client::REST?


If we look at next page [1], it is not possible. I tried to several 
actions in a custom program for working with users, and I was not able 
to do.




If not, how would one do it?


You could do using MySQL queries.


[1]: http://wiki.bestpractical.com/view/REST

Best regards,

--
Alberto Villanueva
Industria
__

ALTRAN

C/Campezo, 1, Edificio 1, Planta 4
28022 Madrid, Spain
Tel : + 34 91 550 41 00
Fax: + 34 91 415 61 53

www.altran.es

Antes de imprimir este mensaje, asegúrate de que es necesario. Proteger
el medio ambiente está también en tu mano.

En cumplimiento de la Ley Orgánica 15/1999, con fecha 13 de diciembre,
de Protección de Datos de Carácter Personal, y la Ley 34/2002, con fecha
11 de julio, de Servicios de la Sociedad de la Información y de comercio
electrónico, le comunicamos que su dirección de correo electrónico forma
parte de un fichero del que es responsable Altran España, y que
garantiza la confidencialidad y seguridad de sus datos. Tiene usted
derecho al acceso, rectificación y cancelación de sus datos en los
términos establecidos en la Ley Orgánica 15/1999 de Protección de Datos
de Carácter Personal y demás normativa concordante, dirigiéndose a
nuestra dirección anteriormente señalada o por medio de correo
electrónico: comunicac...@altran.es .

AVISO LEGAL: Este mensaje, junto con cualquier fichero adjunto, está
dirigido a su destinatario y es confidencial. Cualquier distribución,
uso o reproducción sin consentimiento del remitente está estrictamente
prohibido. Si ha recibido este mensaje por error, por favor proceda a
ponerlo en conocimiento del remitente por e-mail y a borrarlo de su
sistema sin realizar copias.

Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT::Client::REST

2010-07-13 Thread Michelle Sullivan
Alberto Villanueva wrote:
>
>> Got it working a treat, but I need to be able to disable accounts and
>> re-enable them, is this possible with RT::Client::REST?
>
> If we look at next page [1], it is not possible. I tried to several
> actions in a custom program for working with users, and I was not able
> to do.
>
>
>> If not, how would one do it?
>
> You could do using MySQL queries.

I was trying to avoid talking to the RT DB directly - the other option
is to change the name to name.disabled (or some random string) as I am
tracking the numeric ID, so that would be a solution.  I guess the other
option is to disable the internal auth and use my DB for auth (which
it's already doing, I just haven't disabled the internal one.)

For information only, I'm running a separate DB which provides
authentication into other systems, and RT will use it and fall back to
it's own.  I'm currently merging the 2 so that the account creation and
update in my DB will replicate the changes to the old RT installation
and have a 'verify email' before making active function in my DB.  I
wanted to disable the account in RT if they changed their email until
such time as they verified it.

Michelle


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT::Client::REST

2010-07-13 Thread Kevin Falcone
On Tue, Jul 13, 2010 at 10:09:31AM +0200, Michelle Sullivan wrote:
> Alberto Villanueva wrote:
> >
> >> Got it working a treat, but I need to be able to disable accounts and
> >> re-enable them, is this possible with RT::Client::REST?
> >
> > If we look at next page [1], it is not possible. I tried to several
> > actions in a custom program for working with users, and I was not able
> > to do.
> >
> >
> >> If not, how would one do it?
> >
> > You could do using MySQL queries.
> 
> I was trying to avoid talking to the RT DB directly - the other option
> is to change the name to name.disabled (or some random string) as I am
> tracking the numeric ID, so that would be a solution.  I guess the other
> option is to disable the internal auth and use my DB for auth (which
> it's already doing, I just haven't disabled the internal one.)
> 
> For information only, I'm running a separate DB which provides
> authentication into other systems, and RT will use it and fall back to
> it's own.  I'm currently merging the 2 so that the account creation and
> update in my DB will replicate the changes to the old RT installation
> and have a 'verify email' before making active function in my DB.  I
> wanted to disable the account in RT if they changed their email until
> such time as they verified it.

You can certainly use the RT perl API to disable/enable users.
RT-Authen-ExternalAuth can also manage passwords/enable|disable users
from an external sql db, but it only checks when a user tries to log
in.

-kevin


pgpu2KRyJ9qwk.pgp
Description: PGP signature

Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] RT::Client::REST

2006-12-07 Thread Dmitri Tikhonov
On Thu, 2006-12-07 at 07:05 -0500, Roy El-Hames wrote:
> I am looking for pointers to use RT::Client::REST in particular how to
> populate/update custom fields,any one used this for 3.6.1
> (Dmitri ??);

Gosh, it's been a while since I touched this :)

RT::Client::REST::Object (and, therefore,
RT::Client::REST::Object::Ticket) has method 'cf' which should work.  If
it does not, file a bug and I'll take care of it.

  - Dmitri.


___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] RT::Client::REST and replacing the contents of a custom field

2009-08-18 Thread Brian Friday
Hi all,

I am trying to use the RT::Client::REST perl module to interact with a
custom field called "group" which allows for the selection of multiple
values.

I am having great success in adding a value (even the same value) to
the field but no success in subtracting or removing values from the
field.

Has anyone had any success in using this client to remove one or more
values from a field?

Thanks for your time,

Brian


Code shown below:

Snippet 1:

sub update_cfield {

my $ticket;

# Ticket to update
my $id = shift;

# CF field name to update
my $field = shift;

# Value to update field with
my $value = shift;

$ticket = RT::Client::REST::Ticket->new(
rt => $rt,
id => $id,
cf => { $field => [$value], },
)->store;

}# End update ecs area subroutine


Snippet 2:

$rt->edit( type => 'ticket', id => $id, set => {
$field => $field_value});

Two possible code types but both seem to add not replace the existing
selection of a custom field that can be
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com