12 Oct 2008
05 Dec 2008
Link to this post
I am about to implement my first Intra-Site module for sitefinity (first of any kind of module for Sitefinity).
I have installed and carefully reviewed the Contacts module with LINQ and Security. I am wondering how much of the security sections in that module transfer in a copy-and-paste fashion to a new module?
For example, in the Security folder for the Contacts module there are two files: GlobalPermission.cs and GlobalPermissions.cs. I have to say that it is not entirely clear to me what is going on with these files. For my new module, can I just copy and paste them? Is there anything going on inside of those two files that specific to a Contacts Module and would need tobe modified for my Foo module? I am guessing the namespace is the key thing to change. Is it really that simple?
My question also pertains to the "security" region of the ContactsManager.cs file and the SecurityRoot, SecurityRoots overrides in the Module.cs file. Again all of this seems to be generic.
Finally, if these sections and files are truly generic, is there not a way to remove them from the module-specifc classes and abstract them out so they donot need to be copied and pasted for each module?
I know these questions may sound nieve, but I am new to this.