Hi Harala,

Ah -- I see.  Yes, Geert (and you) are right in identifying the need for 
a server content element. :)

Probably the easiest thing for you to do at this point is to add a 
SERVE_CONTENT element (without inheriting authentication) to your 
veli.xml.  Experiment with accessing content through it, just like your 
initial e-mail requested:
http://localhost:8080/veli/dersane/content/dersane/1/image

Though the url may be something more like:
http://localhost:8080/veli/content/dersane/1/image

The different URL is because you aren't using CRUD on the second site, 
you don't need the extra 'dersane'. :)

Josh
--
Joshua Hansen
Up Bear Enterprises
(541) 760-7685


harala wrote:
> 
> 
> On Sep 13, 11:37 pm, Josh Hansen <[EMAIL PROTECTED]> wrote:
>> Hi Harala,
>>
>> I may not be understanding what problem you are trying to solve. :)
>>
>> Do you have your user roles clear?
>> * admin users are in both 'admin' and 'user'
>> * veli users are in the role 'user'
>>
> They have different roles. Admin users are not in both admin and user.
> 
>> In the above example you could have two authentication elements, one for
>>   the 'admin' role, and one for the 'user' role.  Pages/elements that
>> require admin access would inherit the 'admin' auth element, while the
>> SERVE_CONTENT element inherits the 'user' auth element.
>>
>> Can you provide (for each site):
>> * Your authentication element declaration
>> * Your SERVE_CONTENT declaration
>> * Your datasource declaration
>>
> 
> My participant.xml file is below.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
>   -  Copyright 2004-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
>   -  Licensed under the Apache License, Version 2.0 (the "License");
>   -
>   -  $Id: participants.xml 3825 2007-06-28 15:47:25Z gbevin $
>   -->
> 
> <!DOCTYPE rep SYSTEM "/dtd/rep.dtd">
> 
> <rep>
>       <property name="datasource"><datasource>postgresql</datasource></
> property>
>     <participant param="rep/config-base.xml">ParticipantConfig</
> participant>
>     <participant param="rep/datasources.xml">ParticipantDatasources</
> participant>
>       <!--crud structures -->
>       <participant param="headman.client.model.Dersane.Dersane
>                                               headman.client.model.Classroom
>                                               headman.client.model.Student
>                                               headman.client.model.Payment
>                                       headman.client.model.Hoca
>                                       headman.client.model.Comment
>                                       headman.client.model.WeeklyProgram
>                                       headman.client.model.Attendance
>                                               
> headman.client.model.VeliLastLoginInformation
>                                               
> headman.client.model.unitesinav.UniteSinavMainBean
>                                               
> headman.client.model.unitesinav.UniteSinavSonucu
>                                               
> headman.client.model.OSS.OSSMainBean
>       
> headman.client.model.OSS.OSSSonuc">CreateCrudStructureParticipant</
> participant>
>     <participant param="rep/users.xml">ParticipantMemoryUsers</
> participant>
>       <participant
> blocking="true">com.uwyn.rifejumpstart.participants.CreateAuthenticationStructure</
> participant>
>     <participant param="sites/main.xml">ParticipantSite</participant>
>  </rep>
> 
> I did not write serve_content element, I know it is the problem, but I
> did not understand it as I wrote in the email above. My datasource
> declaration is below
> 
>     <datasource name="postgresql">
>         <driver>org.postgresql.Driver</driver>
>         <url>jdbc:postgresql://localhost:5432/<config
> param="database_name"/></url>
>          <user><config param="database_user"/></user>
>         <password><config param="database_password"/></password>
>         <poolsize>5</poolsize>
>     </datasource>
> 
> And my config-base.xml is below.
> 
> <config>
>       <param name="DATASOURCE">postgresql</param>
> 
>       <param name="database_name">sistem</param>
>       <param name="database_user">otomasyon</param>
>       <param name="database_password">fockme</param>
>       <param name="LOGIN_NAME_MAXIMUM_LENGTH">100</param>
>       <param name="LOGIN_NAME_MINIMUM_LENGTH">5</param>
> 
> 
> </config>
> 
> My veli.xml contains the lines below
> 
>         <globalexit name="home" destid="Home"/>
> 
>         <arrival destid="Home"/>
> 
>         <element id="Home" url="/home" extends="rife/template/
> print.xml" >
>                 <property name="name">veli.home</property>
>         </element>
> 
> I don't know what will I do. Should I wrote different serve_content
> configuration for each element I wrote in veli.xml file?
> 
>> Josh
>> --
>> Joshua Hansen
>> Up Bear Enterprises
>> (541) 760-7685
>>
>> harala wrote:
>>
>>> On Sep 13, 9:19 pm, Josh Hansen <[EMAIL PROTECTED]> wrote:
>>>> Hi Harala,
>>>> First off, are you intending to restrict viewing of the image?  If not,
>>>> then you should be able to remove whatever security requirements and
>>>> then anyone will be able to view the image, including users who aren't
>>>> logged in.
>>>> A bit of clarification: do the same credentials work for each site?  For
>>>> example, does a veli user have access to both the admin _and_ veli
>>>> sites, or just the veli site?
>>> No they veli can not access to admin site. So the hints wont work for
>>> me :(
>>>> If so, then one thing you can do is duplicate your authentication
>>>> element for both sites.  To do this:
>>>> * configure each site's authentication element to use an identical
>>>> datasource.  You can do this by specifying the datasource property in
>>>> the authentication element.
>>>> <property
>>>> name="datasource"><datasource>auth_datasource</datasource></property>
>>>> * make sure the sites are hosted on the same domain.  It looks like the
>>>> cookie path is always set to '/', so just hosting the sites on the same
>>>> domain should be sufficient.
>>>> Reference:http://rifers.org/wiki/display/RIFE/Remembering+users+between+authent...
>>>> All the best,
>>>> Josh
>>>> --
>>>> Joshua Hansen
>>>> Up Bear Enterprises
>>>> (541) 760-7685
>>>> harala wrote:
>>>>> Hi, I have two sites, One's name is admin and the other one's name is
>>>>> veli
>>>>> I have images, I can reach that image using a url like this
>>>>> http://localhost:8080/admin/dersane/content/dersane/1/image
>>>>> But when I log in to veli site and not log in to admin site, I can not
>>>>> reach that image. Is there a way to reach the image using a url like
>>>>> http://localhost:8080/veli/dersane/content/dersane/1/imageorcalling
>>>>> an element? (I read the wiki but I couldn't get things done.I take a
>>>>> 404 error.)
>>>>> Thanks for the answers.
>>> I used the wiki page below. I wrote a code very similar to ViewNews
>>> class that is told in wiki. I called the element, the page was shown
>>> but the image not. I right clicked on the image and sayed open in new
>>> tab. Then I saw a 404 error while showing only the image on the page.
>>> I don't know what I did wrong.
>>> http://rifers.org/wiki/display/RIFE/Content+management+framework
>>> I thouhgt that my veli.xml file is wrong configured. I am sending you
>>> a part of my configuration.
>>>    <globalexit name="home" destid="Home"/>
>>>    <arrival destid="Home"/>
>>>    <element id="Home" url="/home" extends="rife/template/print.xml" >
>>>            <property name="name">veli.home</property>
>>>    </element>
>>> Thanks for reply.
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to