I have a problem which I hope someone can help me with.
I,ll briefly show what tables I have and then the problem.
Now then, obviously this is designed for a website, which has named modules to seperate the different sections. Each of these modules has a set of permissions associated with it. The permissions table will hold every permission needed by any module (some will need all permissions, others will need only a selected few, and I want to keep the ability to create a new permission at any time).
The modulepermissions table, will hold details about the permissions a module can have.
Now I need to be able to associate a group with a permission for a module, that the module has, and not able to select a permission which isnt defined in the modulepermission table.
If a group that needs access to a module must have all the permissions for that module, then it suffices to have only the group_id and module_id in the last table, since the permissions can be inferred from the modulePermissions table.
If a group can have access to only some features of a given module, then what you have done is correct.