On 9/20/2010 9:01 PM, ilo wrote:
Hi, I just joined the habari community today (I installed habari this
morning for the first time), so this is going to be my first entry in
this group. To reduce the learning curve for this fantastic framework
I've started developing some of 'my' required funcionalities that I've
found missing.
Welcome to the group! I hope that you find Habari useful!
I've finished a module that allow administrators (permissions to
manage users) to block users. Blocked users can't login the site. This
way there is no need to remove or change ownership of the content, and
still disallow access temporarely or permanently.
It is my first habari plugin, I just joined today, and probably I'll
be making common mistakes, so please, try to be kind and gently..
I will need some advise, Would anyone make a quick review of the
plugin? I'm openminded and I'll be available on irc.
I downloaded your plugin, but have not yet installed it. Looking at the
code first, I see that you're not using the permissions/ACL system but
user properties in order to restrict access. My opinion is that it
would be better to create a new permission and then permit/restrict
access based on that.
I like the idea of doing things to users in bulk. Assigning them to
groups or removing them from groups would be a good thing to add to
core, as well as a hook for adding items to that menu so that you don't
have to replace the whole admin template to add these features via plugin.
There is at least one place in your code where I see a call to
$user->__get('blocked') which is incorrect. PHP dispatches properties
on UserInfo through the call to __get(), so if you have this:
if( $info->__get('blocked') == 1 )
You should be able to do this:
if( $info->blocked == 1 )
This looks a bit cleaner, and perhaps explains a bit how some of the
other internals of Habari work.
I'll give the full plugin a go in a while (gotta do regular work today)
but this looks pretty sophisticated for a first attempt. Well done.
If your license is ASL, you should consider adding your plugin to the
extras repo so that others can find it and download it from the
habariproject site directly. Whether you do that or not, you should
change the plugin info xml so that you appear as the author. ;)
Owen
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev