Re: [Zope3-Users] need help on skins

2006-09-08 Thread Stephan Richter
On Friday 08 September 2006 04:54, Denis Shaposhnikov wrote:
> apidoc from 3.3.0b2 said me that "layer" in the "page" directive is
> deprecated:
>
> """
>  layer   -  LayerField   (default = None)
> The layer the view is in.
>
> BBB: DEPRECATED
> """
>
> What to use instead of?

This is a mistake. Could you make a bug report please?

http://www.zope.org/Collectors/Collectors/Zope3-dev

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on skins

2006-09-08 Thread Denis Shaposhnikov
> "Stephan" == Stephan Richter <[EMAIL PROTECTED]> writes:

 >> > layer="admin_layer"     template="admin_details.pt"/>
 >>
 >> and
 >>
 >> > layer="user_layer"     template="user_details.pt"/>
 >>
 >> ?

 Stephan> Absolutely! :-) That's the point of layers and skins!

apidoc from 3.3.0b2 said me that "layer" in the "page" directive is
deprecated:

"""
 layer   -  LayerField   (default = None)
The layer the view is in.

BBB: DEPRECATED
"""

What to use instead of?

Thanks!

-- 
DSS5-RIPE DSS-RIPN 2:550/[EMAIL PROTECTED] 2:550/[EMAIL PROTECTED]
xmpp:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://neva.vlink.ru/~dsh/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on skins

2006-09-06 Thread Stephan Richter
On Wednesday 06 September 2006 07:51, Denis Shaposhnikov wrote:
> > "Stephan" == Stephan Richter <[EMAIL PROTECTED]> writes:
>
>  Stephan> I think Albert's solution is okay, but I would also suggest
>  Stephan> that you should consider redirecting to a different URL for
>  Stephan> each user. Those different URLs could reflect the different
>  Stephan> skins.
>
> Do you mean to redirect say Administrator to `/++skin++Admin/` and
> Just-A-User to `/++skin++Just-A-User/`? That's a solution and even I
> can hide `++skin++` part by WWW proxy to URIs like just `/Admin/` and
> `/Just-A-User/`.

Yep, that would be much more desirable. Of course you could use 
z3c.pluggabletraverser to produce those URLs in Zope as well.

> But I have a question. How to prevent user of group 
> Just-A-User from accessing admin's skin for example? Can I use
> simething like
>
>      name="details.html"
>     permission="zope.AdminView"
>     layer="admin_layer"
>     template="admin_details.pt"/>
>
> and
>
>      name="details.html"
>     permission="zope.UserView"
>     layer="user_layer"
>     template="user_details.pt"/>
>
> ?

Absolutely! :-) That's the point of layers and skins!

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on skins

2006-09-06 Thread Albertas Agejevas
On Wed, Sep 06, 2006 at 03:32:45PM +0400, Denis Shaposhnikov wrote:
> Could somebody explain me how to find such information by myself. The
> my main problem with Zope3 is that I don't known how Zope is working
> as whole. I mean, what happend and where. I know about ++apidoc++ but
> it seems no so usefull.

Isn't it the same with any complex engineering system?  What do you
need to do in order to be able to diagnose and fix problems in car
engines?  Read a book or two, dip your toes in by fixing something
simple, gradually increase the complexity and you'll be an expert in a
year or six.

It's the same with Zope 3: read a couple of books, write a simple app
of your own, read the lists, participate on the IRC channel, fix bugs
in the collector.  Read the source.

There might be shortcuts, but generally in order to gain experience
you need to, well, spend time on building experience.

Albertas
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on skins

2006-09-06 Thread Denis Shaposhnikov
> "Stephan" == Stephan Richter <[EMAIL PROTECTED]> writes:

 Stephan> I think Albert's solution is okay, but I would also suggest
 Stephan> that you should consider redirecting to a different URL for
 Stephan> each user. Those different URLs could reflect the different
 Stephan> skins.

Do you mean to redirect say Administrator to `/++skin++Admin/` and
Just-A-User to `/++skin++Just-A-User/`? That's a solution and even I
can hide `++skin++` part by WWW proxy to URIs like just `/Admin/` and
`/Just-A-User/`. But I have a question. How to prevent user of group
Just-A-User from accessing admin's skin for example? Can I use
simething like



and



?

-- 
DSS5-RIPE DSS-RIPN 2:550/[EMAIL PROTECTED] 2:550/[EMAIL PROTECTED]
xmpp:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://neva.vlink.ru/~dsh/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on skins

2006-09-06 Thread Denis Shaposhnikov
> "Albertas" == Albertas Agejevas <[EMAIL PROTECTED]> writes:

 >> behaviour in Zope3? The simplest way as I see is use different
 >> skins? But how to dynamically change the skin to user's type?

 Albertas> You can set the skin in a handler to BeforeTraverseEvent.
 Albertas> You can find an example of such a subscriber at the bottom
 Albertas> of
 Albertas> 
http://source.schooltool.org/trac/browser/trunk/schooltool/src/schooltool/app/browser/skin.py

Oh, thanks a lot!

Could somebody explain me how to find such information by myself. The
my main problem with Zope3 is that I don't known how Zope is working
as whole. I mean, what happend and where. I know about ++apidoc++ but
it seems no so usefull.

-- 
DSS5-RIPE DSS-RIPN 2:550/[EMAIL PROTECTED] 2:550/[EMAIL PROTECTED]
xmpp:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://neva.vlink.ru/~dsh/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on

2006-09-06 Thread Stephan Richter
On Wednesday 06 September 2006 05:32, Denis Shaposhnikov wrote:
> I'm thinking on how to use Zope3 for my task and need some help. I
> have a web application which have different look for different
> users. Every user need to authenticate and have a some type like an
> Administrator, Operator, SomeManager, Just-A-User and so on. For
> example my webapp have an URL like `http://server/mywebapp/`. So,
> after authentication every user see `http://server/mywebapp/`
> according his type.

You know that this violates the Web design as described by Fielding, right? 
(Yeah, yeah, I just read this stuff carefully; very enlightening!)

> Could you give me advice or start point how to implement such behaviour
> in Zope3? The simplest way as I see is use different skins? But how to
> dynamically change the skin to user's type?

I think Albert's solution is okay, but I would also suggest that you should 
consider redirecting to a different URL for each user. Those different URLs 
could reflect the different skins.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on

2006-09-06 Thread Albertas Agejevas
On Wed, Sep 06, 2006 at 01:32:29PM +0400, Denis Shaposhnikov wrote:
> I'm thinking on how to use Zope3 for my task and need some help. I
> have a web application which have different look for different
> users. Every user need to authenticate and have a some type like an
> Administrator, Operator, SomeManager, Just-A-User and so on. For
> example my webapp have an URL like `http://server/mywebapp/`. So,
> after authentication every user see `http://server/mywebapp/`
> according his type.
> 
> Could you give me advice or start point how to implement such behaviour
> in Zope3? The simplest way as I see is use different skins? But how to
> dynamically change the skin to user's type?

You can set the skin in a handler to BeforeTraverseEvent.  You can
find an example of such a subscriber at the bottom of
http://source.schooltool.org/trac/browser/trunk/schooltool/src/schooltool/app/browser/skin.py

Albertas
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] need help on

2006-09-06 Thread Denis Shaposhnikov
Hi!

I'm thinking on how to use Zope3 for my task and need some help. I
have a web application which have different look for different
users. Every user need to authenticate and have a some type like an
Administrator, Operator, SomeManager, Just-A-User and so on. For
example my webapp have an URL like `http://server/mywebapp/`. So,
after authentication every user see `http://server/mywebapp/`
according his type.

Could you give me advice or start point how to implement such behaviour
in Zope3? The simplest way as I see is use different skins? But how to
dynamically change the skin to user's type?

Thanks!

-- 
DSS5-RIPE DSS-RIPN 2:550/[EMAIL PROTECTED] 2:550/[EMAIL PROTECTED]
xmpp:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://neva.vlink.ru/~dsh/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users