29 December, 2009

Extending the Security Module of SilverStripe

Okay back to web development after my post yesterday.

Now I was in need to code up a section which is about user registration. Now this is quite easy with SilverStripe's User Page Module. But this module didn't help me out while implementing the site. I needed some other extended features such as,
  • Accept subscription payments
  • Set subscription amounts
  • Enable discounts / promos
  • Different user types
  • Different permissions
Now these things have been quite a bit of a headache for me in the beginning as I couldn't find a proper way of implementing this. After reading some of the core CMS codes (the security admin) I found my lucky niche to get it done.

Now this is what I mainly planned out. I am decorating the Group class to hold up subscriptions, promos, and most importantly the user permissions. By following this method I could quite smoothly. All I had to do when the registering process is that add the user to the correct group, and my client is really happy as he is able to do all the things inside one page, the Security Admin.

The codes are there so I am hoping to release them soon. Till then hope this post will be quite a buzz.

1 comment:

ramage said...

Hi Nivanka,

Are you stilling planning on releasing this as a module. I have a need to implement the same thing (paid member subscription) and woudl be interested in how you achieved this in Silverstripe. cheers!