I am designing a cms, but before I do that I,m concentrating on the ums - user management, now, I have designed what I think to be a good table structure but I thought I would post here for everyone to look at, and hopefully give advice.
I,ll explain it a little, firstly there is the module table, this will list every unique aspect of the site, i.e contact, news, tutorials etc etc.
Then a permissions table, i.e view, edit, delete etc, I thought this would be good, otherwise I would have to create a sub module table, and create a sub module for each permission, now seeing as most modules will be using the same basic set of permissions, its easier this way.
Does the module_has_permissions table look ok to everyone? you,ll notice there is a PK called module-has_permission_id and two FK's which have also been incorporated into a unique index. Is this the correct to achieve what I want, which is this...
Modules can have any number of permissions, but a group can only be given a permission if it already exists.
If anyone can offer advice, alternate way of doing the same or thinks what I have is good, then please fell to comment.