Forum OpenACS Q&A: Was groups changed in OACS 4.5 beta?

Collapse
Posted by Jun Yamog on
Hi,

I am merging one of our sites to use OACS 4.5 beta.  The site used to
run well on CVS copy 3/7/2002.  I have tried to look at some bboard
postings could not find one and there are too many group question
postings.  Sorry if this is a redundant question.

Anyway on pre-beta code the permissions and groups seems to work fine.
My site has several subsites under the main subsite.  Each subsite
has its own permissions, I then give permissions to a user via the db
api membership_rel__new.  It works fine and correctly on prebeta code
and data model.  But now using beta 1-2 it seems that the proper
membership are not being done.  Also under /admin/groups the subsite
groups are not listed anymore.  prebeta 1 code displayed them as
predicted.

Has there been any major changes in the group code from 3/7 to beta1-2
code?  Its seems groups are not working properly so my permissions is
not working properly now all users has access to all of the subsites
rather than being able to access only their subsites.  I am glad that
I have not yet upgraded the production site yet.

Collapse
Posted by Jun Yamog on
After doing some further investigation it seems that only the first subsite shows this problem.  Any other subsite that I have created (e.g. 2nd, 3rd and so forth) works fine.  Also checked this out with the prebeta 1 code.  Same behaviour, so I guess this counts as a bug on both the prebeta 1 and beta 1-2 code.  I think this problem has been encountered too by someone, I could not find the post.  Can somebody help?
Collapse
Posted by Jun Yamog on

Hi,

I have semi-solved the problem. First the permissions problem is unrelated to the groups problem. The permission problem is traced backed to the tester using another add user interface. What I have told her to do was to user /acs-admin/users but she uses the /[sub site]/admin/users/new.tcl. This means the relationship already made when the tester adds the user and the page /admin/users/new.tcl works.

Regarding the /admin/groups page it seems that the first "[subsite name] parties" is not showing because in the view application_group_element_map.element_id does not contain the object_id of the first subsite. This is the current query :

  select g.group_id, g.group_name from (
    select distinct g.group_id, g.group_name
      from (select group_id, group_name
              from groups g, acs_objects o
             where g.group_id = o.object_id
		and o.object_type = 'application_group') g,
           (select object_id
            from all_object_party_privilege_map
            where party_id = '2426' and privilege = 'read') perm,
           application_group_element_map m
     where perm.object_id = g.group_id
	and m.package_id = '2394'
	and m.element_id = g.group_id
     order by g.group_id, g.group_name) g
   order by lower(g.group_name)

changing the query by removing "and m.element_id = g.group_id"

  select g.group_id, g.group_name from (
    select distinct g.group_id, g.group_name
      from (select group_id, group_name
              from groups g, acs_objects o
             where g.group_id = o.object_id
		and o.object_type = 'application_group') g,
           (select object_id
            from all_object_party_privilege_map
            where party_id = '2426' and privilege = 'read') perm,
           application_group_element_map m
     where perm.object_id = g.group_id
	and m.package_id = '2394'
     order by g.group_id, g.group_name) g
   order by lower(g.group_name)

Gives you all of the sub site parties but of course this is not the right behavior but the original query may not be right too. It should display all the sub site parties under the main site including the first subsite. If somebody can confirm or deny this problem please do. I will gladly enter it on the SDM and maybe after I finish this site I can check further on this.