tildemark / cms

Other
0 stars 0 forks source link

MIssing group_model.php #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
During the pre-release, please update your files with the latest svn before
reporting a defect
-----

What steps will reproduce the problem?
1. Any attempt to access group features.
2. Any attempt to access avatars.

What is the expected output? What do you see instead?
If you have this code please add to repository. If not let me know and I
will created it.If you have ideas on how you wantto this to function let me
know.

Randall

Please use labels and text to provide additional information.

Original issue reported on code.google.com by rmorga...@gmail.com on 11 Jun 2009 at 4:08

GoogleCodeExporter commented 9 years ago
There is no group model and controller yet. But this is how I thought of it:

In /application/libraries/User.php at arround line 32 there is the group call 
to fill
$this->user->groups
Now, each visitor is assigned automatically into at least one group, Group 0 
when he
is not logged in, and Group 0 and 1 when he is logged in.

I.e. if now you call var_dump($this->user->groups) then you see array(0) if he 
is not
logged in and array(0, 1) when he is logged in.

In the group method then (that should be in Admin controller) There should be 
the
ability to create new groups and assign members to one or more groups. To be
remembered that group ID 0 and 1  are already taken for Everybody and Registered
respectively.

The implementation for other modules is like this: 
For example for the Page module, a content may be just read by registered 
members
only (Group Id = 1) or by a specified group. 

I don't know if that can be ok, it is in my plan but not now so if you can 
implement
it then you are very welcome.

Original comment by heriniai...@gmail.com on 11 Jun 2009 at 7:54

GoogleCodeExporter commented 9 years ago
Hi Eugene, I'll work on implementing your idea over the next few days. I have 
need of
group membership for a project so I will do my best to implement your ideas.

Original comment by rmorga...@gmail.com on 11 Jun 2009 at 9:20

GoogleCodeExporter commented 9 years ago
Hi Eugene,

I have a working group model and code. However, I have had some difficulty 
getting it 
up on the project site. I also would like to make some changes to this. 

I am in need of setting access levels for various groups in the public portion 
of the 
site. So I would like to add another database table called group_access which 
would 
basically be a copy of the admin table except that group ids would be used in 
place 
of usernames. Then we could easily control what groups had what level of 
access. For 
instance, in a forum everyone could view a forum but only members could post, 
or only 
members of a certain group could post to a given forum.

Let me know your thoughts on this and also if you could give direction in 
committing 
code to the repository I would be happy to place my code there.

Thanks

Original comment by rmorga...@gmail.com on 26 Jan 2010 at 4:48

GoogleCodeExporter commented 9 years ago
Hi Randall

For a general module level, that would be interesting. But for each module, it 
will 
be a confusion.

Let's say, in my page module, I want to implement a feature that some pages are 
accessible only for a group of people. To do that, what I should do is to 
create a 
group access for the page module only. Because to put that in a general group 
access 
will be a mess because it would then depend on page_ids.

So to do this, it is preferable to create another module called 
page_group_access 
which will  mainly do some hook on the page module (hook to add new fields when 
adding a page (group access), a plugin to filter when page is loaded (according 
to 
groups)

That is in my mind to do for a site project.

Original comment by heriniai...@gmail.com on 27 Jan 2010 at 9:40

GoogleCodeExporter commented 9 years ago
So then I should simply add the forum level access to the forum module itself 
and fore-
go any attempt to produce a system wide access level system?

In other words, each module will be responsible for providing it's own ACL?

Thanks for clearing this up for me.

Original comment by rmorga...@gmail.com on 27 Jan 2010 at 9:45

GoogleCodeExporter commented 9 years ago
For the whole system, there is only the group management, where the admin adds 
new 
groups and assign members to groups.

But then the implementation for each module should be left to its own. The real 
case 
would be like this.

For the whole system, one can create groups like SuperAdmin, Politic_admin, 
Social_admin etc... 

In the forum module, some topics about politics would have Politic_admin to add 
new 
topic, delete messages etc.

In the page module, those same Politic_admin can modify or add sub-pages under 
the 
Politic page only (with specified page_id). They don't have rights for other 
pages.
So the right for that Politic_admin, apart from forum,  is linked with that 
very 
page_id.

Original comment by heriniai...@gmail.com on 27 Jan 2010 at 10:08