Comments (7)
On 2012-05-09 03:39, Elizabeth Leddy wrote:
I have no idea if anyone still uses this plugin but me so I'll open
an issue first and see. When using this product, we don't need to
show the login bar when unauthenticated OR the search bar, since they
both lead no where. It's easy to override this in zcml (code below).
should this be part of the standard offering for this package?
I use it extensively, and this is a good and logical idea.
from iw.rejectanonymous.
Hi,
It's somehow difficult to make a definitive answer to this kind of issue. I can understand that this is an issue, but this bunch of ZCML will affect all sites of your Zope instance, even the ones for which iw.rejectanonymous is not enabled.
Perhaps (untested) re-registering the viewlets with a "for" attribute like this would work, since the "for" attribute is a registration discriminator (see zope.viewlet.metaconfigure.viewletDirective
):
<browser:viewlet
name="plone.personal_bar"
for="iw.rejectanonymous.IPrivateSite"
manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
class="plone.app.layout.viewlets.common.PersonalBarViewlet"
permission="cmf.ListFolderContents"
/>
Otherwise this would require to change dynamically the viewlet's permission or visibility in the iw.rejectanonymous.rejectAnonymous
function.
HTH
Gilles
from iw.rejectanonymous.
What do you think about working with a layer ?
On Wed, May 9, 2012 at 12:29 PM, Gilles Lenfant <
[email protected]
wrote:
Hi,
It's somehow difficult to make a definitive answer to this kind of issue.
I can understand that this is an issue, but this bunch of ZCML will affect
all sites of your Zope instance, even the ones for which iw.rejectanonymous
is not enabled.Perhaps (untested) re-registering the viewlets with a "for" attribute like
this would work, since the "for" attribute is a registration discriminator
(seezope.viewlet.metaconfigure.viewletDirective
):<browser:viewlet name="plone.personal_bar" for="iw.rejectanonymous.IPrivateSite" manager="plone.app.layout.viewlets.interfaces.IPortalHeader" class="plone.app.layout.viewlets.common.PersonalBarViewlet" permission="cmf.ListFolderContents" />Otherwise this would require to change dynamically the viewlet's
permission or visibility in theiw.rejectanonymous.rejectAnonymous
function.HTH
Gilles
Reply to this email directly or view it on GitHub:
Thomas Desvenain
Téléphone : 09 51 37 35 18
from iw.rejectanonymous.
I'm up for the layer or testing out the Private site interface option. I personally added this code for a specific layer but I confess that I never have more than one so I don't know the intricate details on that. The lazy dev in me wants to try the interface way but if layers are where its at I'll go that route
from iw.rejectanonymous.
Hi Thomas and Liz,
Just tested the suggested solution : it works like a charm on Plone 4.1 (and certainly on 3.x) and has no side effect on sites of the same Zope instance on which the "private site" feature is disabled.
Anyway, I'd prefer something like :
hiddenViewlets = set(('plone.personal_bar', 'plone.searchbox'))
That would make customisation less noisy. But I need to go in depth of - perhaps private - stuffs of viewlets and viewlet managers.
Liz : I suggest using a permission granted to an "Authenticated" user (say "Set own properties") rather than a permission granted to a "Contributor". Other opinion around ?
Thomas : An additional layer is somehow overkill IMHO. This component has no (and does not need) a GS profile and does not record persistent data, except the IPrivateSite marker interface. Let's KISS.
My beer !
Gilles
from iw.rejectanonymous.
Fixed in the master. Please test with it and reopen this issue with detailed comment if it does not work for you.
from iw.rejectanonymous.
most excellent!
from iw.rejectanonymous.
Related Issues (8)
- needs new release HOT 9
- doesn't work with plone.app.theming HOT 3
- Does not work with Plone 5 HOT 2
- What about a new release? There's a pdb statement in 1.2.5 HOT 6
- "Private site" option is not available in controlpanel in Plone 5.2
- Fix error in Plone 6, classic UI, when rendering the personal bar
- Make compatible with pas.plugin.oidc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iw.rejectanonymous.