How to toggle view?

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

How to toggle view?

LawsonEnglish
  How do I make it so that people who are not logged in see one message
and people who are logged in, see another?


I created an HTML component named "newbies" with permissions for "other"
set to "view" and permissions for "mygroup" not set.

then I referenced it in a link +newbies+


I still see it even as a member of "mygroup" .

On the otehr hand, I added a component named   "grouponly"  and set
permission to view for members of "mygroup" and no permission for "other"...


If you login as a member of mygroup, you can see it, but you can't see
it if you're not logged in.

What am I doing wrong?


Thanks,

Lawson







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

Re: How to toggle view?

LawsonEnglish
  Here's what I want people to see:

LOGGED OUT:
Landing page
General message
you are not logged in

vs
LOGGED IN:
landing page
general page
extra stuff



what I am seeing is:

LOGGED IN:
landing page
general page
extra stuff
you are not logged in <=== shouldn't be there if you are logged in









On 10/14/10 11:44 AM, Lawson English wrote:

>  How do I make it so that people who are not logged in see one message
> and people who are logged in, see another?
>
>
> I created an HTML component named "newbies" with permissions for
> "other" set to "view" and permissions for "mygroup" not set.
>
> then I referenced it in a link +newbies+
>
>
> I still see it even as a member of "mygroup" .
>
> On the otehr hand, I added a component named   "grouponly"  and set
> permission to view for members of "mygroup" and no permission for
> "other"...
>
>
> If you login as a member of mygroup, you can see it, but you can't see
> it if you're not logged in.
>
> What am I doing wrong?
>
>
> Thanks,
>
> Lawson
>
>
>
>
>
>
>
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>

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

Re: How to toggle view?

John McKeon
Lawson,
you can do this using +You must log in>value:user|display=+
Combining the standard feature of an alias being displayed for undefined value links, and the recently added ability to display any arbitrary text for the link when it is defined (in this case blank). You could also do +You must log in>value:user|display=You are logged in as {name}+

John

On Thu, Oct 14, 2010 at 8:07 PM, Lawson English <[hidden email]> wrote:
 Here's what I want people to see:

LOGGED OUT:
Landing page
General message
you are not logged in

vs
LOGGED IN:
landing page
general page
extra stuff



what I am seeing is:

LOGGED IN:
landing page
general page
extra stuff
you are not logged in <=== shouldn't be there if you are logged in










On 10/14/10 11:44 AM, Lawson English wrote:
 How do I make it so that people who are not logged in see one message and people who are logged in, see another?


I created an HTML component named "newbies" with permissions for "other" set to "view" and permissions for "mygroup" not set.

then I referenced it in a link +newbies+


I still see it even as a member of "mygroup" .

On the otehr hand, I added a component named   "grouponly"  and set permission to view for members of "mygroup" and no permission for "other"...


If you login as a member of mygroup, you can see it, but you can't see it if you're not logged in.

What am I doing wrong?


Thanks,

Lawson







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


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



--
http://john-mckeon.us

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

Re: How to toggle view?

LawsonEnglish
  On 10/14/10 7:05 PM, John McKeon wrote:

> Lawson,
> you can do this using +You must log in>value:user|display=+
> Combining the standard feature of an alias being displayed for
> undefined value links, and the recently added ability to display any
> arbitrary text for the link when it is defined (in this case blank).
> You could also do +You must log in>value:user|display=You are logged
> in as {name}+
>
> John
>
Thanks, I was trying to use the simplest possible example, however, just
to isolate the issues with permission and display.

In the "real world" case, I'm actually hoping to have the alternatives
be data from my own test avatar showing, or, once someone is logged into
the wiki/blog, they have the option to use an interface to log their own
avatar into second life and observe how things work and even control it
in various ways in the context of the wiki/blog

So what I want to do is a bit more than controlling arbitrary text. I
was hoping for a way to control display of generic components this way,
but I'm not sure if your solution will do that or not.

Thanks for the suggestion.


Lawson



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

Re: How to toggle view?

Lukas Renggli
"Pier Unix Security" does not allow you to remove permissions.

If you give some permission to the other permissions, these
permissions will be given to anybody even if the owner or group does
not match. It is kind of hard to explain in a mail, but I think the
code is pretty explanatory:

PUSecurity>>hasPermission: aPermission for: aUser
        "Test if the user aUser has the permission aPermission. This is the
central method to test for permissions in Pier."

        (aUser notNil and: [ aUser isSuperuser ])
                ifTrue: [ ^ true ].
        (self owner = aUser and: [ self ownerPermissions includes: aPermission ])
                ifTrue: [ ^ true ].
        (self group notNil and: [ (self group includes: aUser) and: [ (self
groupPermissions includes: aPermission) ] ])
                ifTrue: [ ^ true ].
        (self otherPermissions includes: aPermission)
                ifTrue: [ ^ true ].
        ^ false

In your particular case I suggest that use CSS so that when the user
is logged in the other message is hidden below the logged-in DOM
element. Alternatively you can create your own Seaside component,
similar to PUSecurityWidget.

Lukas

On 15 October 2010 06:26, Lawson English <[hidden email]> wrote:

>  On 10/14/10 7:05 PM, John McKeon wrote:
>>
>> Lawson,
>> you can do this using +You must log in>value:user|display=+
>> Combining the standard feature of an alias being displayed for undefined
>> value links, and the recently added ability to display any arbitrary text
>> for the link when it is defined (in this case blank). You could also do +You
>> must log in>value:user|display=You are logged in as {name}+
>>
>> John
>>
> Thanks, I was trying to use the simplest possible example, however, just to
> isolate the issues with permission and display.
>
> In the "real world" case, I'm actually hoping to have the alternatives be
> data from my own test avatar showing, or, once someone is logged into the
> wiki/blog, they have the option to use an interface to log their own avatar
> into second life and observe how things work and even control it in various
> ways in the context of the wiki/blog
>
> So what I want to do is a bit more than controlling arbitrary text. I was
> hoping for a way to control display of generic components this way, but I'm
> not sure if your solution will do that or not.
>
> Thanks for the suggestion.
>
>
> Lawson
>
>
>
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
www.lukas-renggli.ch

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