Re: [Hypercontent-users] How to read groups.xml from the CAS server.
Brought to you by:
alexvigdor
From: tom t. <j_l...@ya...> - 2007-02-14 00:25:24
|
Thanks Alex, I modified the code but look my observations I followed the following steps 1) Close all the browser instances in my machine 2) Logged into uPortal via CAS 3) Could not see the Edit link which points to HC in my portlet, Also I tried with my sample jsp (outside uPortal) but result is the same. but After that being in the same browser I hit with the following URL http://localhost:8080/hypercontent/testproject/index.html?mode=login&passmode=page-edit-link Then it shows the following in the page <div> <a target="hc2-window" href="http://localhost:8080/hypercontent/testproject?mode=interactive&screen=edit">edit</a> </div This is exactly what I want but just the Edit link is not appearing. Previous occations above was only appearing when I login to HC only (uPortal login was not enough). Which means somthing is working Even though it is not applicable for us, the only occation which I can see Edit link is (based on my previous mail) First login to HC and my client test page has the following <script type="text/javascript" language="javascript"> loadToElement(document.getElementById('page-edit-link-div'),'http://localhost:8080/hypercontent/testproject/index.html?mode=page-edit-link'); </script> above is what I tried initialy Following is the recent jsp file which I modified based on your recent feedback. Should I need further modifications? <html> <head> </head> <body> This is inside a sample HC page <script type="text/javascript" language="javascript" src="http://localhost:8080/hypercontent/js/common.js"> </script> <script type="text/javascript" language="javascript" src="http://localhost:8080/hypercontent/js/ajax.js"> </script> <div id="page-edit-link-div"></div> <script type="text/javascript" language="javascript"> loadToElement(document.getElementById('page-edit-link-div'),'http://localhost:8080/hypercontent/testproject/index.html?mode=login&passmode=page-edit-link'); </script> </body> </html> --- Alex Vigdor <al...@bi...> wrote: > Try changing the link to > > http://localhost:8080/hypercontent/testproject/index.html? > > mode=login&passmode=page-edit-link > > This should tell HC to try the login, and to forward > to page-edit- > link when login is done. > > Let me know how it works! > > Cheers, > Alex > > On Feb 13, 2007, at 12:39 AM, tom tom wrote: > > > Thanks Alex, > > > > It looks to me the request should point to a file, > but > > my intention is to provide the Edit link to the > home > > of the project so that user can edit whatever he > > wants. > > > > I achieved the above as follows in the jsp it > points > > to a file as follows > > > > <script type="text/javascript" > language="javascript"> > > > loadToElement(document.getElementById('page-edit-link-div'),'http:// > > > > localhost:8080/hypercontent/testproject/index.html?mode=page-edit- > > > link'); > > </script> > > > > but in the page-edit-link.vm modified as follows > > > > <div> > > #if ($session.Authenticated && > > > $session.hasPermission($project,'write',$request-path)) > > <a target="hc2-window" > > > href="${abs-project-base}?mode=interactive&screen=edit">edit</a> > > #end > > </div> > > > > Above works fine BUT the above fails in the > following > > use case > > > > user login to uPortal (this user has rights to > edit > > content in the testproject in HC) He has not login > to > > HC yet but because HC is casified it is not > necessary. > > > > > > The problem is in this case the Edit link is not > shown > > > > > > > > But if the user login to HC first and goes to > uPortal > > it shows the Edit link. > > > > Our entry point is always uPortal hence the first > > option is what we are looking for. That is if the > > logged in user has the permission he should have > the > > Edit link enabled to go to the HC testproject. > > > > How can we go about doing this. > > > > Do we need to change any other source files > > > > Thanks > > > > > > > > > > > > > > > > > > > > --- Alex Vigdor <al...@bi...> wrote: > > > >> Have you tried accessing > >> > >> > > > http://localhost:8080/hypercontent/testproject/?mode=page-edit-link > >> > >> directly in the browser? If not, double-check > the > >> pipeline > >> configuration. If you can get it directly, check > >> the javascript > >> console for errors when the JSP tries to make the > >> xmlhttprequest. > >> > >> In general, you'll want to point the request to > an > >> actual file, e.g. > >> > >> > > > http://localhost:8080/hypercontent/testproject/index.xml?mode=page- > >> > >> edit-link > >> > >> Cheers, > >> Alex > >> > >> On Feb 12, 2007, at 8:42 PM, tom tom wrote: > >> > >>> Hi Alex, > >>> > >>> In order to get the Edit link I followed all the > >> steps > >>> but it not appearing. > >>> > >>> Initially I tried with the uPortal portlet and > >> Edit > >>> link was not appearing. > >>> > >>> Then I created a sample jsp page as shown below. > >> As my > >>> HC is casified I did login to HC and then hit > the > >> URL > >>> which points to the sample jsp I created. Still > >> the > >>> Edit link is not showing. > >>> > >>> I am using Fedora browser. > >>> > >>> Can you let me know what's wrong here, Any way > to > >>> trouble shoot > >>> > >>> I incooperated the pipeline.xml which is in > >> bootstrap > >>> (I did edit manually) > >>> > >>> > >>> sample jsp > >>> > >>> <html> > >>> <head> > >>> </head> > >>> > >>> <body> > >>> This is to check the EDIT link comes > >>> <script type="text/javascript" > >> language="javascript" > >>> > >> > > > src="http://localhost:8080/hypercontent/js/common.js"> > >>> </script> > >>> <script type="text/javascript" > >> language="javascript" > >>> > >> > src="http://localhost:8080/hypercontent/js/ajax.js"> > >>> </script> > >>> > >>> <div id="page-edit-link-div"></div> > >>> > >>> <script type="text/javascript" > >> language="javascript"> > >>> > >>> > >> > > > loadToElement(document.getElementById('page-edit-link-div'),'http:// > >> > >>> > >> > > > localhost:8080/hypercontent/testproject/?mode=page-edit-link'); > >>> </script> > >>> > >>> </body> > >>> </html> > >>> > >>> > >>> > >>> --- Alex Vigdor <al...@bi...> wrote: > >>> > >>>> > === message truncated === ____________________________________________________________________________________ Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html |