Forum OpenACS Development: Re: Replicate news among instances of news pkg

Posted by Ryan Gallimore on
Hi Iuri,

This may be more complicated than it needs to be.

Why do you need multiple package instances?

It sounds like you can create one news instance and permission each item you create. Create a new dropdown of grantees (parties) in the news create admin page and grant read permission on submit.

Your users with read on the main site news package will then only see the items that have been permissioned for them. I would suggest granting permissions to groups or relational segments rather than individual users.

Posted by Iuri Sampaio on

You misunderstood the main idea. What you described doesn't fit in the scenario.

The structure is already in place, package instances are already there.
I want to avoid the duplicated work of the staff. i.e. the situation to manually create a "news item" twice, on two different package instances.

Posted by Ryan Gallimore on

I was suggesting a change in your scenario to prevent unnecessary work.

1) Why do you have so many news instances?

2) Can you permission the individual news items inside one instance instead of using many package instances? This would avoid duplicating objects.

3) How is news being viewed on your site by your users? A use case would be helpful.

If the structure is already in place, it would not be difficult to alter the context of the existing items and move them to a new package.

Posted by Iuri Sampaio on
1) Because every subsite as well as dotlrn communities, must have an individual application of news.

2) I agree that duplicated objects looks at least unnecessary and redundant information. But I still don't see another way to accomplish it. Your approach about giving permission seems very confuse, plus it would add even more customised code in the news package .

3) What do you mean with a use case of how the news are viewed?
The news are viewed by subsite or dotlrn community. Each one community or subsite has one instance of news package, if its closed the news are available only to members, if not the public is allowed to view so.

I don't why it was made like that but maybe there is a reason for it. I believe it was to make things more organised and easier to maintain. I also think the same.

By the way, We are discussing what is the best to be done, aren't we?

Once we figure out the approach to take I am well aware of how to code it