How hide items for anonymous users only?

5 messages Options
Embed this post
Permalink
Mikko Ohtamaa () How hide items for anonymous users only?
Reply Threaded More More options
Print post
Permalink
Hi,

I already asked this question at add-on product developers, but this might a more appropriate place.

I have a problem that I have some content which must be directly accessible via URL for anonymous users, but should not come up in any listing/search results. This is draft content which must be previewable via a direct link. The site administrators must be see this content normally.

What kind of permission/index magic I must do to make this possbile? Can I overwrite exclude_nav() on per role basis? Can I utilize Access content information permission.

Cheers,
Mikko
Raphael Ritz () Re: How hide items for anonymous users only?
Reply Threaded More More options
Print post
Permalink
Mikko Ohtamaa wrote:
> Hi,
>
> I already asked this question at add-on product developers, but this might a
> more appropriate place.
>
> I have a problem that I have some content which must be directly accessible
> via URL for anonymous users, but should not come up in any listing/search
> results. This is draft content which must be previewable via a direct link.

Up to here I would have proposed to not index the object in the
catalog (or unindex it) but ...

> The site administrators must be see this content normally.
>

... site admins would be affected by that as well.

> What kind of permission/index magic I must do to make this possbile? Can I
> overwrite exclude_nav() on per role basis?

Don't think so. (of course you can override it but in the
end there is only one thing in the catalog)
Under the hood that's just a flag set on the object and
mirrored in the catalog meta data.


Sorry but I see no immediate and easy solution :-(

Raphael


> Can I utilize Access content
> information permission.
>
> Cheers,
> Mikko
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users
Mikko Ohtamaa () Re: How hide items for anonymous users only?
Reply Threaded More More options
Print post
Permalink
> Don't think so. (of course you can override it but in the
end there is only one thing in the catalog)
Under the hood that's just a flag set on the object and
mirrored in the catalog meta data.

Somehow the security is build into the existing catalog mechanism. Otherwise anonymous user would not get different search result set compared to the site admin. I need to hook up into this system, but I have no clue where to start.

Cheers,
Mikko
Sergey V. () Re: How hide items for anonymous users only?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Mikko Ohtamaa

Mikko Ohtamaa wrote:
I already asked this question at add-on product developers, but this might a more appropriate place.

I have a problem that I have some content which must be directly accessible via URL for anonymous users, but should not come up in any listing/search results. This is draft content which must be previewable via a direct link. The site administrators must be see this content normally.

What kind of permission/index magic I must do to make this possbile? Can I overwrite exclude_nav() on per role basis? Can I utilize Access content information permission.
Approach the problem from the other end - keep all the premissions/workflow intact but provide a view which renders your content for anonymous, and then provide a URL to that view.

http://localhost:8080/myplone/my-secret-content/draft-preview

Mikko Ohtamaa () Re: How hide items for anonymous users only?
Reply Threaded More More options
Print post
Permalink

Sergey V. wrote:
Approach the problem from the other end - keep all the premissions/workflow intact but provide a view which renders your content for anonymous, and then provide a URL to that view.

http://localhost:8080/myplone/my-secret-content/draft-preview
Brilliant idea Sergey! Thanks a lot for this.

The anonymous user should be able to edit one field. I guess I can do this with normal AT security flow if I have an edit view using my custom function permissions.