Forum OpenACS Development: Directory and deleted users

Collapse
Posted by Mark Aufflick on
I am working on Bug #576: Deleted users displayed and i'm wondering if there is ever a time that we would want Directory to be able to show deleted users?

If not, then the fix is to just alter a few views. If so, then life gets more complicated, but how would this ever be triggered? A UI option available only to admins that lets you choose to view deleted users as well? But isn't that what /acs-admin/users is for?

I think just changing the views is the way to go (especially since we are now in feature lock down), but i wanted to check before i went ahead.

Collapse
Posted by Lars Pind on
Mark,

Thanks for tackling this. I'd say no parameter, just show only users with member_state = 'approved'.

/Lars

Collapse
Posted by Mark Aufflick on
no problem - the join is too much for my tired brain right now  (to do it well anyway) - i will do it in the morning!
Collapse
Posted by Mark Aufflick on
wait a minute - the view dir_all_users is made from parties & persons (ie not just users)

this makes sense to me, but the text of the directory page says "Registered Users".

should it be parties or users only?

Collapse
Posted by Dave Bauer on
Look at cc_users for this. It was slow on large systems previously, so I suspect the dir_all_users view was a hack.

cc_users has been improved so it might scale up for this purpose now.

As an aside, is there a test server with a large amount of users to test this kind of thing against?

If not, it sounds like a good idea to add scalability testing of large databases to the list someday.

Collapse
6: Large test server (response to 5)
Posted by Malte Sussdorff on
Not really a test server, but AIESEC live server has brought up a couple of culprits so far, that Dirk posted back to the community.
Collapse
7: Re: Large test server (response to 6)
Posted by Mark Aufflick on
ok - is everyone happy with this query:

SELECT DISTINCT
       p.party_id AS user_id,
       p.email, pe.first_names,
       pe.last_name,
       p.url
  FROM parties p,
       persons pe,
       group_approved_member_map gem
 WHERE p.party_id = pe.person_id
   AND gem.member_id = p.party_id
Collapse
8: Re: Directory (response to 7)
Posted by Mark Aufflick on
that would make dir_group_memberss view easy:

create view dir_group_members as
   select p.party_id as user_id, p.email, pe.first_names, pe.last_name, p.url, gem.group_id
     from parties p, persons pe, group_approved_member_map gem
    where p.party_id = pe.person_id
      and p.party_id = gem.member_id
for dir_all_users - is there any case when a registered user will be a member of no groups and thus not appear in group_approved_member_map? (all users seem to appear in both magic groups -1 and -2)

if not, then i can simplify directory to only need one of these two views.