Hooking to Pier Security

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Hooking to Pier Security

SeanTAllen
I'm trying to learn how to hook into the pier security/user model but  
I'm getting lost amongst
all the trees. Can someone point to the right couple classes/methods  
to look in?

I got as far as PBEntry having an author and uuid but from there...  
lost.

Trying to understand how I can use a Seaside application inside pier  
and use
pier users/security etc.

Any and all help, big and small greatly appreciated.


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Hooking to Pier Security

Lukas Renggli
> I got as far as PBEntry having an author and uuid but from there...
> lost.

1. Click on 'Add'
2. Select 'Component'
3. Choose your Seaside component you want to secure from the list.
4. The application is added to Pier now.

Now to get started with security you need to first add a few
components to manage users and groups:

1. The same way you added your application add the Pier components

1.a. Users
1.b. Groups

Now comes the fun part, securing the pages. Remember that the Pier
model resembles a Unix file-system, but with objects. Every page (or
component) has an owner and a group, as well as permissions for owner,
group and others. You can change these settings using the commands
'Change Owner', 'Change Group' and 'Change Others'. The commands are
very powerful and can be applied recursively to whole trees. As well
as they allow one to add or remove specific permissions (such as
viewing or editing).

Hope this helps?

There is some more information in the FAQ [1].

Cheers,
Lukas

[1] http://www.piercms.com/doc/faq

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Hooking to Pier Security

SeanTAllen

On Oct 22, 2008, at 11:25 AM, Lukas Renggli wrote:

>> I got as far as PBEntry having an author and uuid but from there...
>> lost.
>
> 1. Click on 'Add'
> 2. Select 'Component'
> 3. Choose your Seaside component you want to secure from the list.
> 4. The application is added to Pier now.
>
> Now to get started with security you need to first add a few
> components to manage users and groups:
>
> 1. The same way you added your application add the Pier components
>
> 1.a. Users
> 1.b. Groups
>
> Now comes the fun part, securing the pages. Remember that the Pier
> model resembles a Unix file-system, but with objects. Every page (or
> component) has an owner and a group, as well as permissions for owner,
> group and others. You can change these settings using the commands
> 'Change Owner', 'Change Group' and 'Change Others'. The commands are
> very powerful and can be applied recursively to whole trees. As well
> as they allow one to add or remove specific permissions (such as
> viewing or editing).
>
> Hope this helps?
>

Let me try this again.. I need to be able to get the information on  
the user
undertaking an action and store it... like

Ed is logged in
Ed creates an object, object is listed as having been created by Ed.


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Hooking to Pier Security

Lukas Renggli
> Ed is logged in
> Ed creates an object, object is listed as having been created by Ed.

The currently logged user is in PRContext.

You can get the current context from anywhere using PRCurrentContext value.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Hooking to Pier Security

SeanTAllen

On Oct 22, 2008, at 11:49 AM, Lukas Renggli wrote:

>> Ed is logged in
>> Ed creates an object, object is listed as having been created by Ed.
>
> The currently logged user is in PRContext.
>
> You can get the current context from anywhere using PRCurrentContext  
> value.


Ah,

Let me make sure I have this right..

for a  PRContext user will get me the current user ( PUUser instance )  
which gets me name.

I have that correct?


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Hooking to Pier Security

Lukas Renggli
>> The currently logged user is in PRContext.
>>
>> You can get the current context from anywhere using PRCurrentContext
>> value.
>
> Ah,
>
> Let me make sure I have this right..
>
> for a  PRContext user will get me the current user ( PUUser instance )
> which gets me name.
>
> I have that correct?

Yes, have a look at the accessors in PRContext.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Hooking to Pier Security

SeanTAllen

On Oct 22, 2008, at 12:20 PM, Lukas Renggli wrote:

>>> The currently logged user is in PRContext.
>>>
>>> You can get the current context from anywhere using PRCurrentContext
>>> value.
>>
>> Ah,
>>
>> Let me make sure I have this right..
>>
>> for a  PRContext user will get me the current user ( PUUser  
>> instance )
>> which gets me name.
>>
>> I have that correct?
>
> Yes, have a look at the accessors in PRContext.
>

Did. Just wanted to make sure I had it correct. Learning Pier is a bit  
of a
struggle at first but I'm starting to get some things slowly.  I look  
forward to the moment of
revelation when it comes.

Thanks Lukas.

-Sean


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki