Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6702275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:02:07+00:00 2026-05-26T07:02:07+00:00

I’ve created a new view for a folder (based on Tabular view) the only

  • 0

I’ve created a new view for a folder (based on Tabular view) the only the Title and Date for regular viewers, but if the logged in user had the “Editor” role, it shows an additional column. That column needs to list the users who have been given “Reviewer” role to that specific item. For instance, the columns would be:

Title    | Date  | (Reviewers)
Folder 1 | 10/04 | Johnny, Steve, Mary Sue
Folder 2 | 10/13 | Sam, Betty, Johnny

I’ve been able to hide/show the final column based on the authenticated user’s role, but I can’t seem to figure out how to list just the users who have reviewer access. I’ve tried using searchForMembers(), but in addition to being very slow, I can only get it to echo the entire list of Members, or narrowed based on site-wide roles, but I need to get just people who have been manually given Reviewer role on the specific folder.

Here’s the code for the entire column:

<td tal:define="is_manager python:test(here.portal_membership.getAuthenticatedMember().has_role('Manager'), 1, 0);"
    tal:condition="is_manager">
    <tal:block tal:define="results python:item.portal_membership.searchForMembers(roles=['Member']);"> 
        <tal:block tal:condition="results"
                   tal:repeat="user results">
            <tal:block tal:define="fullname python:user.getProperty('fullname')">
                <span tal:replace="fullname">Full Name</span><span>, </span>
            </tal:block>
        </tal:block>
    </tal:block>
</td>

It works when I have roles=[‘Member’], but if I change it to “Reviewer” I get nothing – I think because nobody is assigned as a Reviewer for the entire site, only for specific items. I’ve also tried using .listMembers() in various ways, but it seems that’s restricted and I can’t use it in the page template. Is there a way around this, or is this the “wrong way” to go about this in the first place?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:02:08+00:00Added an answer on May 26, 2026 at 7:02 am

    I’ve answered to a nearly identical question 2 day ago:

    List folders that a user has Reviewer access to in Plone 4

    the updated code should look like this:

    from Products.CMFCore.utils import getToolByName
    
    portal_url = getToolByName(context, "portal_url")
    portal = portal_url.getPortalObject()
    acl_users = portal.acl_users
    
    res = []
    
    local_roles = acl_users._getLocalRolesForDisplay(context)
    for name, roles, rtype, rid in local_roles:
        if 'Reviewer' in roles:
            res.append((name,roles,rtype,rid))
    

    I’d suggest to put this kind of logic in the file python and not in the page template.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I need to clean up various Word 'smart' characters in user input, including but
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.