Alex Mandel | 11 Dec 2008 23:10

[PloneDavis-Discuss] CAS Question

So when one has CAS setup and you need to match the logins to local
accounts for permissions reasons, either 1 you wait for people to login
once and then assign them permissions or 2 prepopulate matches?

I'm wondering how to prepopulate or verify user loginids from CAS with
real people without having to look them up 1 by 1 on the IET site.
(I have about 200 people to go through and will have 20 new per year,
every  year)

Anyone have insite, if I know all their email addresses is their an api
or a person I can ask to run a query through to get back the userIDs of
those people for populating the security of my site?

Thanks,
Alex
Christian Millsop | 11 Dec 2008 23:25
Picon

Re: [PloneDavis-Discuss] CAS Question

Alex,

Over here in the Anthropology Department we have Plone tied to our department Active Directory infrastructure just to populate users and not for authentication.  The user IDs in AD match the CAS/Kerberos IDs of campus.  We create our user accounts that way so we can be able to use Kerberos credentials for login.

Otherwise I've heard of being able to automatically assign CAS users a default role/permissions in Plone.  Someone else probably has more insight on that method.

Christian Millsop

The user IDs have to be the same but our AD has trust with Kerberos so we have all of our users set up

e have a trust between our Active Directory servers and campus so we use Kerberos credentials

On Thu, Dec 11, 2008 at 2:10 PM, Alex Mandel <tech_dev-V1ui0Jp4Xm2ZwHVy+eqOOgC/G2K4zDHf@public.gmane.org> wrote:
So when one has CAS setup and you need to match the logins to local
accounts for permissions reasons, either 1 you wait for people to login
once and then assign them permissions or 2 prepopulate matches?

I'm wondering how to prepopulate or verify user loginids from CAS with
real people without having to look them up 1 by 1 on the IET site.
(I have about 200 people to go through and will have 20 new per year,
every  year)

Anyone have insite, if I know all their email addresses is their an api
or a person I can ask to run a query through to get back the userIDs of
those people for populating the security of my site?

Thanks,
Alex
_______________________________________________
ZUGOD-Discuss mailing list
ZUGOD-Discuss-yBiN6GUkUQKKcLvQ8mt9K4e4f4J1MGUdnKs2IOyhHvI@public.gmane.org
http://www2.dcn.org/mailman/listinfo/zugod-discuss

_______________________________________________
ZUGOD-Discuss mailing list
ZUGOD-Discuss@...
http://www2.dcn.org/mailman/listinfo/zugod-discuss
Alex Mandel | 13 Dec 2008 00:19

Re: [PloneDavis-Discuss] CAS Question

Christian Millsop wrote:
> Alex,
> 
> Over here in the Anthropology Department we have Plone tied to our
> department Active Directory infrastructure just to populate users and not
> for authentication.  The user IDs in AD match the CAS/Kerberos IDs of
> campus.  We create our user accounts that way so we can be able to use
> Kerberos credentials for login.
> 

Here is the question, how did you get the matching username into your AD
 to begin with. That's the part I need to solve.

Thanks,
Alex
Matthew Holland | 13 Dec 2008 00:56
Picon

Re: [PloneDavis-Discuss] CAS Question

I wish I could remember the exact details, but you should be able to query the IET LDAP server.  I've had to do this a few times to find campus ids of users, and every time I have had to figure out the query anew.  But it should be relatively simple to write a script to do this.  IIRC, querying on first and last names is usually good enough, and this should cover the bulk of cases; if there are troublesome queries where you get multiple or zero matches, you can resolve them by hand.

The LDAP attribute schema is here: http://middleware.ucdavis.edu/ldap_attribute.php

The search utility is called ldapsearch.

Good luck,
Matt

On Thu, Dec 11, 2008 at 2:10 PM, Alex Mandel <tech_dev-V1ui0Jp4Xm2ZwHVy+eqOOgC/G2K4zDHf@public.gmane.org> wrote:
So when one has CAS setup and you need to match the logins to local
accounts for permissions reasons, either 1 you wait for people to login
once and then assign them permissions or 2 prepopulate matches?

I'm wondering how to prepopulate or verify user loginids from CAS with
real people without having to look them up 1 by 1 on the IET site.
(I have about 200 people to go through and will have 20 new per year,
every  year)

Anyone have insite, if I know all their email addresses is their an api
or a person I can ask to run a query through to get back the userIDs of
those people for populating the security of my site?

Thanks,
Alex
_______________________________________________
ZUGOD-Discuss mailing list
ZUGOD-Discuss-yBiN6GUkUQKKcLvQ8mt9K4e4f4J1MGUdnKs2IOyhHvI@public.gmane.org
http://www2.dcn.org/mailman/listinfo/zugod-discuss

_______________________________________________
ZUGOD-Discuss mailing list
ZUGOD-Discuss@...
http://www2.dcn.org/mailman/listinfo/zugod-discuss
Huy Tran | 16 Dec 2008 20:07
Picon

[PloneDavis-Discuss] Email Notification on transisiton

Hello all,

I'm trying to get email notifications when someone submits a page for 
review.  I'm currently using Plone 2.5 with UCDPloneSkin and CAS for 
authentication.  I've been following this how-to paying particular 
attention to the External Method reply: 
http://plone.org/documentation/how-to/send-mail-on-workflow-transition/

My scripts are pretty much identical to the one posted in the "Getting 
around permissions problems with an external method" submission on that 
page.  I'm not real familiar with python and scripting for plone so it's 
just copy and try to comprehend for me.  I've gotten to the point where 
on submission, the error I get is "Error Type: MailHostError; Error 
Value: No message recipient designated."  I'm guessing that the script 
is not finding appropriate recipients for the message.  I want this 
message sent to anyone that has the "reviewer" role.

I've attached the external method script.  The redirect script is pretty 
much just one line:

context.submitNotification(state_change,context)

with state_change in the Parameter List.

Thanks for any help.  This should be an easy one for you Plone/Zope gurus.

-- 
Huy Tran
Programmer II
Department of Music
Department of Theatre and Dance
One Shields Ave
Davis, CA 95616
hqttran@...

(530) 752-4716 - Music
(530) 752-4635 - Theatre & Dance
(530) 752-0983 - Fax

def submitNotification(self,state,context):

	obj = state.object
	creator = obj.Creator()
	history = state.getHistory()
	wf_tool = context.portal_workflow

	mMsg = """
	This is an automated submission notification.  You may reply
	to the sender of this message if you have questions.

	Website content has been submitted for review.
	The content was submitted by %s.
	The url is %s.
	"""

	member = context.portal_membership.getMemberById(creator)
	creator = {'member':member,
    	       'id':member.getId(),
        	   'fullname':member.getProperty('fullname','Fullname missing'),
	           'email':member.getProperty('email',None)}

	actorid = wf_tool.getInfoFor(obj,'actor')
	actor = context.portal_membership.getMemberById(actorid)
	reviewer = {'member':actor,
	            'id':actor.getId(),
	            'fullname':actor.getProperty('fullname','Fullname missing'),
	            'email':actor.getProperty('email',None)}

	mTo = reviewer['email']
	mFrom = creator['email']
	mSubj = 'Website content awaits review'
	obj_url = obj.absolute_url() #use portal_url + relative_url
	creatorName = creator['fullname']

	message = mMsg % (creatorName, obj_url)
	context.MailHost.send(message, mTo, mFrom, mSubj)
_______________________________________________
ZUGOD-Discuss mailing list
ZUGOD-Discuss@...
http://www2.dcn.org/mailman/listinfo/zugod-discuss
elliott pollard | 16 Dec 2008 20:18
Picon

Re: [PloneDavis-Discuss] Email Notification on transisiton

I used this same script. But it did not directly work with my plone 
2.5.5., so i hacked (copied below) on the script so that it just sent me 
and email informing me when a telling me the state has changed. i 
basically removed everything except the email to me and a message that i 
typed in.

one of the problem i had was with the proxy roles. under the proxy tab 
after you have clicked on your script you need to set the role of the 
type of user who will be using the script to have proxy permissions 
(i.e. send the mail) or you will run in to permissions problems, and it 
won't give you an error, it just won't work...

make sense?

el

here is my script:

obj=sti.object

mMsg = """
The Profile has been changed.
The url was %s.
"""

mTo = 'eapollard@...'
mFrom = 'auto-email@...'
mSubj = 'someone has updated their Bio.'

obj_url = obj.absolute_url() #use portal_url + relative_url

message = mMsg  % obj_url
context.MailHost.send(message, mTo, mFrom, mSubj)

Huy Tran wrote:
> Hello all,
>
> I'm trying to get email notifications when someone submits a page for 
> review.  I'm currently using Plone 2.5 with UCDPloneSkin and CAS for 
> authentication.  I've been following this how-to paying particular 
> attention to the External Method reply: 
> http://plone.org/documentation/how-to/send-mail-on-workflow-transition/
>
> My scripts are pretty much identical to the one posted in the "Getting 
> around permissions problems with an external method" submission on 
> that page.  I'm not real familiar with python and scripting for plone 
> so it's just copy and try to comprehend for me.  I've gotten to the 
> point where on submission, the error I get is "Error Type: 
> MailHostError; Error Value: No message recipient designated."  I'm 
> guessing that the script is not finding appropriate recipients for the 
> message.  I want this message sent to anyone that has the "reviewer" 
> role.
>
> I've attached the external method script.  The redirect script is 
> pretty much just one line:
>
> context.submitNotification(state_change,context)
>
> with state_change in the Parameter List.
>
> Thanks for any help.  This should be an easy one for you Plone/Zope 
> gurus.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ZUGOD-Discuss mailing list
> ZUGOD-Discuss@...
> http://www2.dcn.org/mailman/listinfo/zugod-discuss

--

-- 
Elliott Pollard
Webmaster

University Writing Program
http://writing.ucdavis.edu

Davis Humanities Institute
http://dhi.ucdavis.edu

University of California, Davis
One Shields Ave.
109 Voorhies Hall
Davis, CA 95616
(530) 752-3099

Gmane